Commit Graph

38776 Commits

Author SHA1 Message Date
Fabien Potencier
33c6766117 minor #37376 [DI][FrameworkBundle] Remove "whitelist" occurrences (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI][FrameworkBundle] Remove "whitelist" occurrences

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

Commits
-------

12ab96ec9b [DI][FrameworkBundle] Remove whitelist occurrences
2020-06-22 13:34:12 +02:00
Robin Chalas
12ab96ec9b [DI][FrameworkBundle] Remove whitelist occurrences 2020-06-22 11:57:22 +02:00
Fabien Potencier
3aa7426ec2 minor #37372 Avoid accessibility errors on symfony web debug toolbar (alexander-schranz)
This PR was merged into the 3.4 branch.

Discussion
----------

Avoid accessibility errors on symfony web debug toolbar

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#...

When for example using the [axe](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd) to test the website for accessibility. Axe will fail because a div element without a role or a parent [landmark](https://www.w3.org/TR/wai-aria-practices/examples/landmarks/HTML5.html) is rendered. To avoid this errors I think we should define it as a specific region.

Commits
-------

223b405168 Avoid accessibility errors on debug toolbar
2020-06-22 10:10:20 +02:00
Nicolas Grekas
484dcbd682 minor #37375 Relax tests to unlock change on master (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Relax tests to unlock change on master

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

Required to make #37373 green.
Doesn't change any outcome.

Commits
-------

afe596e16a Relax tests to unlock change on master
2020-06-22 09:50:22 +02:00
Nicolas Grekas
afe596e16a Relax tests to unlock change on master 2020-06-22 09:47:42 +02:00
Alexander Schranz
223b405168
Avoid accessibility errors on debug toolbar 2020-06-21 18:44:56 +02:00
Fabien Potencier
cc145e2d9c bug #37345 [Form] collect all transformation failures (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] collect all transformation failures

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

Commits
-------

a9987ce341 collect all transformation failures
2020-06-20 09:14:20 +02:00
Christian Flothmann
a9987ce341 collect all transformation failures 2020-06-19 08:23:51 +02:00
Nicolas Grekas
e707967ea8 minor #37346 Added Unit tests for php 8 union types (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Added Unit tests for php 8 union types

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

The missing test cases for #37340.

Commits
-------

2ca8ecdb74 Added Unit tests for php 8 union types.
2020-06-18 22:40:01 +02:00
Alexander M. Turek
2ca8ecdb74 Added Unit tests for php 8 union types. 2020-06-18 22:30:22 +02:00
Nicolas Grekas
8bbbdbe745 Fix 2020-06-18 21:30:53 +02:00
Nicolas Grekas
cf66f03337 bug #37340 [3.4] Fix support for PHP8 union types (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4] Fix support for PHP8 union types

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

This fixes fatal errors on PHP 8 once union types are used. Note that this doesn't provide support for union types, eg autowiring, serializer, etc will just skip them. If another behavior is desired, that'd be for the `5.x` branch.

With PHP 8 coming, calling the `getName()` on the object returned by `ReflectionParameter::getType()` or `ReflectionFunctionAbstract::getReturnType()` might fail. The reason is that these might return a [`ReflectionUnionType`](https://wiki.php.net/rfc/union_types_v2#reflection) now, which has no `getName()` method (same for `isBuiltin() btw.)

Commits
-------

e09372bcbf [3.4] Fix support for PHP8 union types
2020-06-18 19:34:15 +02:00
Nicolas Grekas
e09372bcbf [3.4] Fix support for PHP8 union types 2020-06-18 19:32:39 +02:00
Nicolas Grekas
57251cdcdd bug #37275 [DI] tighten detection of local dirs to prevent false positives (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] tighten detection of local dirs to prevent false positives

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

Commits
-------

b746dd900c [DI] tighten detection of local dirs to prevent false positives
2020-06-18 19:13:26 +02:00
Nicolas Grekas
2290c62047 bug #37090 [PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option (kick-the-bucket)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option

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

Currently the coloring of composer output is forced in some calls, forced not to be colored in one other call and left for auto in the others.

This change would make it uniform, depending on the --colors option of phpunit provided (or not provided) in the call

Commits
-------

968d6c4276 [PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option
2020-06-18 19:09:06 +02:00
kick-the-bucket
968d6c4276 [PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option 2020-06-18 19:08:53 +02:00
Nicolas Grekas
907ffa0701 bug #36230 [VarDumper] Fix CliDumper coloration on light arrays (l-vo)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Fix CliDumper coloration on light arrays

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

When `AbstractDumper::DUMP_LIGHT_ARRAY` is used with the `CliDumper`, the first line (opening bracket) is not colored. When an empty array is dumped (with or without  `AbstractDumper::DUMP_LIGHT_ARRAY`) the array is not colored too. This PR aims to fix that.

Commits
-------

7af3469771 [VarDumper] Fix CliDumper coloration
2020-06-18 18:42:48 +02:00
Nicolas Grekas
c16bb52252 bug #37270 [FrameworkBundle] preserve dots in query-string when redirecting (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] preserve dots in query-string when redirecting

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

Commits
-------

fcc0e2c143 [FrameworkBundle] preserve dots in query-string when redirecting
2020-06-18 18:42:05 +02:00
Nicolas Grekas
13d5e180d2 minor #37343 [3.4] Small update in our internal terminology (Nyholm)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4] Small update in our internal terminology

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

The part of #37128 that applies to 3.4.

Commits
-------

c143aacd81 [3.4] Small update in our internal terminology
2020-06-18 18:37:43 +02:00
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