Commit Graph

38556 Commits

Author SHA1 Message Date
Nyholm
c143aacd81 [3.4] Small update in our internal terminology 2020-06-18 18:35:04 +02:00
Nicolas Grekas
363eec265b bug #37342 [Cache] fix compat with DBAL v3 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix compat with DBAL v3

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

8c4b49613a [Cache] fix compat with DBAL v3
2020-06-18 18:01:11 +02:00
Nicolas Grekas
8c4b49613a [Cache] fix compat with DBAL v3 2020-06-18 17:42:01 +02:00
Laurent VOULLEMIER
7af3469771 [VarDumper] Fix CliDumper coloration
When using AbstractDumper::DUMP_LIGHT_ARRAY
2020-06-15 09:49:39 +02:00
Nicolas Grekas
b746dd900c [DI] tighten detection of local dirs to prevent false positives 2020-06-14 14:27:25 +02:00
Nicolas Grekas
fcc0e2c143 [FrameworkBundle] preserve dots in query-string when redirecting 2020-06-13 17:55:52 +02:00
Fabien Potencier
b30f4c1537 bumped Symfony version to 3.4.43 2020-06-12 13:14:22 +02:00
Fabien Potencier
79b0cc53df
Merge pull request #37244 from fabpot/release-3.4.42
released v3.4.42
2020-06-12 12:57:23 +02:00
Fabien Potencier
4d48338b6c updated VERSION for 3.4.42 2020-06-12 12:57:07 +02:00
Fabien Potencier
4a02bde238 update CONTRIBUTORS for 3.4.42 2020-06-12 12:57:05 +02:00
Fabien Potencier
ab5ac9a02d updated CHANGELOG for 3.4.42 2020-06-12 12:56:53 +02:00
Fabien Potencier
1f83212541 bug #37103 [Form] switch the context when validating nested forms (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] switch the context when validating nested forms

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37072
| License       | MIT
| Doc PR        |

Commits
-------

38135de549 switch the context when validating nested forms
2020-06-12 09:33:15 +02:00
Christian Flothmann
38135de549 switch the context when validating nested forms 2020-06-12 09:11:17 +02:00
Fabien Potencier
816b6ea6f1 Fix typo 2020-06-11 15:00:25 +02:00
Fabien Potencier
54c9054ef4 bug #37182 [HttpKernel] Fix regression where Store does not return response body correctly (mpdude)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix regression where Store does not return response body correctly

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37174
| License       | MIT
| Doc PR        |

Since #36833, the `Store` no longer uses or trusts the `X-Content-Digest` header present on a response, since that may come (in the case of using `CachingHttpClient`) from upstream HTTP sources. Instead, the `X-Content-Digest` is re-computed every time a response is written by the `Store`.

Additionally, the `Store` is implemented in a way that when restoring responses, it does _not_ actually load the response body, but just keeps the file path to the content on disk in another internal header called `X-Body-File`. It is up to others (`HttpCache`, for example) to actually load the content from there. For reasons I could not determine, the file path is also set as the response body.

When the `HttpCache` performs revalidations, it may happen that it wants the `Store` to persist a previously restored response. In that case, the `Store` fails to honor its own `X-Body-File` header. Instead, it would compute (since #36833) the `X-Content-Digest`, which now is a hash of the cache file path.

So, we end up with a response that still carries `X-Body-File` for the original, correct response. Since the `HttpCache` honors this value, we don't immediately notice that. But inside the `Store`, the request is now associated with the _new_ (bogus) content entry.

It takes another round of looking up the content in the `Store` to now get a response where the `X-Body-File` _also_ points to the wrong content entry.

Although I feel a bit uncomfortable with trusting headers that seemingly need to be evaluated in different classes and may come from elsewhere, my suggestion is to skip the write inside `Store` if `X-Body-File` and `X-Content-Digest` are both present and consistent with each other.

Additionally, a `file_exists` check could be added to provide additional assertions, at the cost of accessing the filesystem.

Commits
-------

176e769e5f [HttpKernel] Fix regression where Store does not return response body correctly
2020-06-11 14:59:43 +02:00
Matthias Pigulla
176e769e5f [HttpKernel] Fix regression where Store does not return response body correctly 2020-06-11 14:59:37 +02:00
Fabien Potencier
f87c993c5c bug #36913 [FrameworkBundle] fix type annotation on ControllerTrait::addFlash() (ThomasLandauer)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] fix type annotation on ControllerTrait::addFlash()

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #28991 Fix #34645
| License       | MIT
| Doc PR        | not yet, see below

Removing `string` type-hint of $message at addFlash()

Closes https://github.com/symfony/symfony/issues/28991 and https://github.com/symfony/symfony/issues/34645

Reasons:

* `addFlash()` is just a convenience shortcut for `FlashBagInterface::add()` which doesn't have the type hint: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php#L28 . So removing it here improves consistency.

* https://github.com/symfony/symfony/issues/28991#issuecomment-436755949 is a valid use case for having an object as `$message`.

* Twig doesn't have any rendering helpers for the `message`, see https://symfony.com/doc/current/controller.html#flash-messages . And since users have to take care of displaying the `message` themselves, there's no reason to force a string upon them.

* This isn't a real new feature, but it isn't a bugfix either ;-)
* I didn't update `src/**/CHANGELOG.md` yet.
* I'm not sure if it's necessary to update the docs. Maybe a short note https://symfony.com/doc/current/controller.html#flash-messages ?

Commits
-------

dfb4614541 Update AbstractController.php
2020-06-10 03:56:08 +02:00
Fabien Potencier
b1f19c4027 minor #37104 [Form] rework form validator tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] rework form validator tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

This will allow writing tests for #37103.

Commits
-------

f062e08f4d rework form validator tests
2020-06-09 17:03:24 +02:00
Christian Flothmann
f062e08f4d rework form validator tests 2020-06-09 16:48:06 +02:00
Nicolas Grekas
909931d9a4 Correctly use doctrine/dbal v3+ 2020-06-09 16:07:03 +02:00
Nicolas Grekas
ef6fc09260 [Cache] fix parse error on PHP 5.5 2020-06-09 14:06:18 +02:00
Nicolas Grekas
0f76308929 [Cache] fix compat with doctrine/dbal v3 2020-06-09 13:48:38 +02:00
Nicolas Grekas
e26d5f217b bug #37169 [Cache] fix forward compatibility with Doctrine DBAL 3 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix forward compatibility with Doctrine DBAL 3

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/pull/36987#issuecomment-641208638
| License       | MIT
| Doc PR        |

Commits
-------

316efef8b8 fix forward compatibility with Doctrine DBAL 3
2020-06-09 13:26:53 +02:00
Christian Flothmann
316efef8b8 fix forward compatibility with Doctrine DBAL 3 2020-06-09 13:16:53 +02:00
Nicolas Grekas
911c5d5cbd minor #37164 [WebProfilerBundle] Set NullLogger for functional tests (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Set NullLogger for functional tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/36962
| License       | MIT
| Doc PR        | -

Commits
-------

0b9519975d [WebProfilerBundle] Set NullLogger for functional tests
2020-06-09 11:15:27 +02:00
Thomas Calvet
0b9519975d [WebProfilerBundle] Set NullLogger for functional tests 2020-06-09 10:25:18 +02:00
Nicolas Grekas
6ee6b2e1b8 [travis] add nightly to allowed failures 2020-06-08 17:48:27 +02:00
Nicolas Grekas
9f3b43ab42 [PhpUnitBridge] fix syntax on PHP 5.3 2020-06-04 17:36:03 +02:00
Fabien Potencier
3e0330fd41 bug #37085 [Form] properly cascade validation to child forms (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] properly cascade validation to child forms

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37025, Fix #37027
| License       | MIT
| Doc PR        |

TODO:

- [x] improve test coverage

Commits
-------

7df5298ddf properly cascade validation to child forms
2020-06-04 14:25:55 +02:00
Thomas Landauer
dfb4614541 Update AbstractController.php
Removing `string` type-hint of $message at addFlash()

Closes https://github.com/symfony/symfony/issues/28991 and https://github.com/symfony/symfony/issues/34645

Reasons:

* `addFlash()` is just a convenience shortcut for `FlashBagInterface::add()` which doesn't have the type hint: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php#L28 . So removing it here improves consistency.

* https://github.com/symfony/symfony/issues/28991#issuecomment-436755949 is a valid use case for having an object as `$message`.

* Twig doesn't have any rendering helpers for the `message`, see https://symfony.com/doc/current/controller.html#flash-messages . And since users have to take care of displaying the `message` themselves, there's no reason to force a string upon them.
2020-06-04 12:40:01 +02:00
Nicolas Grekas
400ab7c59b bug #37095 [PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed

…nnot be parsed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37086
| License       | MIT
| Doc PR        | -

Commits
-------

d3f9b7f833 [PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed
2020-06-04 12:31:39 +02:00
Nicolas Grekas
d3f9b7f833 [PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed 2020-06-04 12:28:01 +02:00
Christian Flothmann
7df5298ddf properly cascade validation to child forms 2020-06-04 12:14:17 +02:00
Nicolas Grekas
edd0065c77 bug #37092 [PhpUnitBridge] fix undefined var on version 3.4 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] fix undefined var on version 3.4

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

bd6a06a8b3 [PhpUnitBridge] fix undefined var on version 3.4
2020-06-04 11:19:11 +02:00
Nicolas Grekas
bd6a06a8b3 [PhpUnitBridge] fix undefined var on version 3.4 2020-06-04 11:02:21 +02:00
Fabien Potencier
3519647496 bumped Symfony version to 3.4.42 2020-05-31 07:24:17 +02:00
Fabien Potencier
a72c510fb3
Merge pull request #37016 from fabpot/release-3.4.41
released v3.4.41
2020-05-31 07:14:34 +02:00
Fabien Potencier
8b909cef4b updated VERSION for 3.4.41 2020-05-31 07:14:17 +02:00
Fabien Potencier
46a783df63 update CONTRIBUTORS for 3.4.41 2020-05-31 07:14:13 +02:00
Fabien Potencier
c1b56cd1f8 updated CHANGELOG for 3.4.41 2020-05-31 07:13:42 +02:00
Nicolas Grekas
fa31260e5e [DI] fix typo 2020-05-30 23:06:01 +02:00
Nicolas Grekas
79f80d361c minor #37015 Fix abstract method name in PHP doc block (l-vo)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix abstract method name in PHP doc block

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

d6966c3147 Fix abstract method name in PHP doc block
2020-05-30 22:07:07 +02:00
Laurent VOULLEMIER
d6966c3147
Fix abstract method name in PHP doc block 2020-05-30 21:50:06 +02:00
Nicolas Grekas
d8f282edca Various cleanups 2020-05-30 20:58:05 +02:00
Nicolas Grekas
84081adbf7 bug #36894 [Validator] never directly validate Existence (Required/Optional) constraints (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] never directly validate Existence (Required/Optional) constraints

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36637 #36723
| License       | MIT
| Doc PR        |

Using `Optional` or `Required` like "regular" constraints does not make any sense, but doing so didn't break before #36365. I suggest to ignore them for now and deprecate using them outside the `Collection` constraint in 5.2.

Commits
-------

d333aae187 never directly validate Existence (Required/Optional) constraints
2020-05-30 20:43:38 +02:00
Nicolas Grekas
8e40814164 bug #37007 [Console] Fix QuestionHelper::disableStty() (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix QuestionHelper::disableStty()

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no>
| Tickets       | -
| License       | MIT
| Doc PR        | -

We broke it when adding `Terminal::hasSttyAvailable()`.
Let's fix it on 3.4 and move it to terminal on master, as suggested in #36977

Commits
-------

5d93b61278 [Console] Fix QuestionHelper::disableStty()
2020-05-30 20:43:03 +02:00
Nicolas Grekas
ca66e6cede minor #37003 [PropertyAccess] Fix TypeError parsing again (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] Fix TypeError parsing again

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #36872
| License       | MIT
| Doc PR        | N/A

Apparently, the format of `TypeError`s has changed again in php8. While investigating, I noticed our error message parsing is not handling anonymous classes well, so I've added some test cases for them.

I chose a fuzzier regular expression to parse the expected return type from the error message. Additionally, I'm checking the stack trace if the caught `TypeError` is really caused by the accessor call.

Commits
-------

03b4e98630 [PropertyAccess] Fix TypeError parsing again.
2020-05-30 20:42:19 +02:00
Nicolas Grekas
2e8ae40183 bug #36865 [Form] validate subforms in all validation groups (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] validate subforms in all validation groups

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36852
| License       | MIT
| Doc PR        |

Commits
-------

b819d94d14 validate subforms in all validation groups
2020-05-30 20:41:29 +02:00
Nicolas Grekas
e8beef468b bug #36907 Fixes sprintf(): Too few arguments in form transformer (pedrocasado)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixes sprintf(): Too few arguments in form transformer

Similar to: #29482

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | none
| License       | MIT
| Doc PR        | none

Fixes the form reverse transformation when the method viewToNorm is called within a value with the character %:

Before : "sprintf(): Too few arguments"

After : Form reverse transformation works.

Reference : http://php.net/manual/function.sprintf.php

Commits
-------

ff7d3f4f01 Fixes sprintf(): Too few arguments in form transformer
2020-05-30 20:40:39 +02:00
Pedro Casado
ff7d3f4f01 Fixes sprintf(): Too few arguments in form transformer 2020-05-30 19:48:24 +02:00