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
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
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
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
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
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Convert CurlHttpClient::handlePush() to instance method
| Q | A
| ------------- | ---
| Branch? | 4.4 / 5.1
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#37252 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch master.
-->
Commits
-------
9497972500 [HttpClient] Convert CurlHttpClient::handlePush() to instance method
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] Reset question validator attempts only for actual stdin (bis)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
#37160 [fails](https://travis-ci.org/github/symfony/symfony/jobs/698492147), this should fix it by looking at the actual input stream.
Commits
-------
867642e337 [Console] Reset question validator attempts only for actual stdin (bis)
This PR was merged into the 4.4 branch.
Discussion
----------
Reset question validator attempts only for actual stdin
| Q | A
| ------------- | ---
| Branch? | 4/4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#37046
| License | MIT
| Doc PR |
Let's see what CI says. Works for me locally with phpunit and when running such command manually
Commits
-------
8fe7be4212 Reset question validator attempts only for actual stdin
This PR was merged into the 4.4 branch.
Discussion
----------
[PropertyInfo] Make PhpDocExtractor compatible with phpDocumentor v5
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36049
| License | MIT
| Doc PR | N/A
Version 5 of phpDocumentor introduced some changes to the `getTagsByName()` method that break the `PhpDocExtractor`.
More specific, it now returns an instance of `InvalidTag` instead of `null` when parsing an invalid tag.
Commits
-------
b1f8e5a80a Make PhpDocExtractor compatible with phpDocumentor v5
Version 5 of phpDocumentor introduced some changes to the
`getTagsByName()` method that break the `PhpDocExtractor`.
More specific, it now returns an instance of `InvalidTag` instead of
`null` when parsing an invalid tag.
* 3.4:
switch the context when validating nested forms
Fix typo
[HttpKernel] Fix regression where Store does not return response body correctly
rework form validator tests
Update AbstractController.php
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Follow up to https://github.com/symfony/symfony/pull/37193
Unresolved parameters pointing to environment variables can be added to definitions after ResolveParameterPlaceHoldersPass execution. It is the case in the initial reported bug (RegisterListenersPass is executed after ResolveParameterPlaceHoldersPass). In this case, the parameter value is an env placeholder, so we need to try to resolve it.
Commits
-------
dac3c8fae8 [DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
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
This PR was merged into the 4.4 branch.
Discussion
----------
Remove non-existing arg and param from serializer service config
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets |
| License | MIT
| Doc PR |
Leftover from #22741
Commits
-------
d179d71f45 Remove non-existing arg and param from serializer service config
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
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection][CheckTypeDeclarationsPass] Always resolve parameters
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/37166
| License | MIT
| Doc PR | -
> Only array parameters are not inlined when dumped.
This is true only when the XML debug container is used, not on a live container that can contain unresolved parameters in the `%my_param%` form. That was my mistake. We have to resolve to get the parameter type.
`$value = [];` was just an improvement to avoid useless parameter resolve btw.
Commits
-------
da0e2c36ef [DependencyInjection][CheckTypeDeclarationsPass] Always resolve parameters
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] fix offset computation for data chunks
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
A minor thingy, still a bugfix.
Commits
-------
ff05be06ec [HttpClient] fix offset computation for data chunks