This PR was merged into the 4.4 branch.
Discussion
----------
[MonologBridge] Fix the server:log help --filter sample
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | N/A <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | N/A
Commits
-------
bc383215a3 [MonologBridge] Fix the server:log help --filter sample
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpKernel] [HttpCache] Keep s-maxage=0 from ESI sub-responses
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
When the `ResponseCacheStrategy` is merging ESI surrogates and the master response, it treats `s-maxage=0` as if no `s-maxage` has been set.
The result is that for a main and a surrogate response that both are `public, s-maxage=0`, the result will only be `public`, with no further expiration time.
https://datatracker.ietf.org/doc/html/rfc7234#section-4.2.2 allows caches to assign a _heuristic expiration time_ when no explicit expiration time has been given but the response has been marked as explicitly cacheable with `public`. Clearly, such a heuristic was _not_ intended or desired when `public, s-maxage=0` was given.
This PR ensures that `s-maxage=0` is passed along with the resulting response.
### Some notes on `s-maxage=0`
You might argue that `s-maxage=0` does not make sense on a response.
According to https://datatracker.ietf.org/doc/html/rfc7234#section-3.2, `s-maxage=0` is a valid setting to ensure that a cached response "cannot be used to satisfy a subsequent request without revalidating it on the origin server".
This setting can be used to keep responses in edge caches/CDNs, but to re-validate on every request. The bottom line result can still be faster (304 + response already at the edge vs. fetch response from origin).
To my understanding, the difference between `s-maxage=0` and `must-revalidate` is that a "disconnected" cache (one that cannot contact the origin server) _must not_ use a stale response when `must-revalidate` is used, but _is not prohibited_ from doing so for `s-maxage=0` (https://datatracker.ietf.org/doc/html/rfc7234#section-4.2.4). In other words, `must-revalidate` is not exactly the same as (or the "right" way instead of) `s-maxage=0`.
In the special case of ESI (composite) responses, revalidation is not possible (no `ETag`, no `Last-Modified`). But, as explained above, it is still important to pass on the explicit expiration time, instead of having no value for it.
Commits
-------
ee7bc0272e [HttpKernel] [HttpCache] Keep s-maxage=0 from ESI sub-responses
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] Fix tests for PHP 8.1
| 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 | Part of #41552 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | N/A
Commits
-------
f2b0822401 [VarDumper] Fix tests for PHP 8.1
This PR was merged into the 4.4 branch.
Discussion
----------
Pin masterminds/html5 to the master branch for PHP 8.1
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Our tests on PHP 8.1 require the changes I've made in Masterminds/html5-php#207. Unfortunately, Composer will not pick a version with those changes because of the reasons described in Masterminds/html5-php#209. This PR adds a small workaround to the PHP 8.1 job which I'll happily revert as soon as Masterminds/html5-php#209 is resolved.
Commits
-------
9c69e77805 Pin masterminds/html5 to the master branch for PHP 8.1
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] Replace var_export with VarExporter to use array short syntax in secrets list files
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | _N/A_
| License | MIT
| Doc PR | _N/A_
I've been using secrets a lot lately. Unfortunately, command exports the `{env}.list.php` with the "old" array syntax using `array()`, and writing `null` in uppercase.
This results in tedious situations with PHP CS Fixer (for example) rewriting the whole file to restore the modern syntax, each time we add a secret.
The Sodium vault currently uses `var_export`. I suggest using Symfony VarExporter, which does the work just fine. It adds a dependency to the FrameworkBundle, but it is a cleaner way to do it rather than using [this type of hack](https://www.php.net/manual/fr/function.var-export.php#124194) IMO.
Commits
-------
7f1c76212f [FrameworkBundle] Replace var_export with VarExporter to use array short syntax
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection] throw proper exception when decorating a synthetic service
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40784
| License | MIT
| Doc PR | -
Commits
-------
b763a29514 [DependencyInjection] throw proper exception when decorating a synthetic service
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] [DebugClassLoader] Do not check Phake mocks classes
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | [Phake Issue #300](https://github.com/phake/phake/issues/300)
| License | MIT
| Doc PR | -
Similar issue as https://github.com/symfony/symfony/pull/38373 but with Phake mocking framework
Commits
-------
9ed93df77a [ErrorHandler][DebugClassLoader] Do not check Phake mocks classes
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] fix handling the COMPOSER_BINARY env var when using simple-phpunit
| Q | A
| ------------- | ---
| Branch? | 4.4 and next
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41774
| License | MIT
Since the renaming of the simple phpunit file (from the shebang to the php file) in #31364, it looks like the change made from #36566 was lost as it seems to have been merged after.
So this PR is an attempt to "restore" that functionnality, as it was considered a bug fix on 3.4 at the time.
poke `@nicolas`-grekas
Commits
-------
9589b52a78 Reapply the change to allow to set the composer binary path
This PR was merged into the 4.4 branch.
Discussion
----------
[WebLink] fix types on Link::withAttribute()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40126
| License | MIT
| Doc PR | -
Related to 10e52348a2
Commits
-------
29903e2c35 [WebLink] fix types on Link::withAttribute()
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] allow savePath of NativeFileSessionHandler to be null
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41669
| License | MIT
By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.
Commits
-------
f8a082daeb [HttpFoundation] allow savePath of NativeFileSessionHandler to be null
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Fix some typos in Greek language
| 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 -->
| License | MIT
Fix some typos in Greek language
Commits
-------
8df2ea12d3 Fix some typos in Greek language
This PR was submitted for the 5.4 branch but it was squashed and merged into the 4.4 branch instead.
Discussion
----------
[Process] Fix incorrect parameter type
In the affected line of code, fclose() should ONLY be passed a parameter of type resource, but fopen() can return a value of type bool (if the fopen() fails). This results in a fatal error under PHP 8: Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given.
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
d1579a2922 [Process] Fix incorrect parameter type
This PR was merged into the 4.4 branch.
Discussion
----------
[Config] Backport type declarations
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
This PR backports type declarations from #41575 where it's safe to do so.
Commits
-------
46e18aff9b [Config] Backport type declarations
This PR was merged into the 4.4 branch.
Discussion
----------
[VarExporter] Fix test on PHP 8.1
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #41552
| License | MIT
| Doc PR | N/A
On PHP 8.1, when dumping the properties of an object (either through serialization, `var_dump` or an array cast), those properties might appear in a different order than on PHP 8.0 and earlier.
Because of that, the test I'm fixing here fails. Since the order of the properties is not really important, I'm sorting the dumped array by key in order to get a stable order.
Commits
-------
56359cb999 [VarExporter] Fix test on PHP 8.1
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] Fix CSV file mime type guess test for PHP 8.1
| 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 | Part of #41552 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | N/A
I had the same result as `@derrabus` on my computer: `application/csv`. The CI returns `text/csv`. These two seem possible, although `text/csv` is described in [RFC 7111](https://datatracker.ietf.org/doc/html/rfc7111#page-3).
(Oops little typo in title, thanks Alexander for the fix 🙏 )
Commits
-------
117cb8f085 [DependencyInjection] Fix CSV file mime type guess test for PHP 8.1
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Revert bindto workaround for unaffected PHP versions
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41622
| License | MIT
| Doc PR | N/A
This PR reverts the changes of #38086 for PHP versions that don't need that workaround.
Commits
-------
e9afce3334 [HttpClient] Revert bindto workaround
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection] Fix testServiceSubscriber for PHP 8.1
| 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 | Fix#41592 and part of #41552 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | N/A
Commits
-------
a5be196827 [DependencyInjection] Fix testServiceSubscriber for PHP 8.1
This PR was merged into the 4.4 branch.
Discussion
----------
Optimize travis file a bit
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
fe51b80903 Optimize travis file a bit
This PR was merged into the 4.4 branch.
Discussion
----------
Add missing translations for Swedish
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41483
| License | MIT
Add missing Swedish translations to Security component.
Commits
-------
65e96dd13f Add missing translations for Swedish
This PR was merged into the 4.4 branch.
Discussion
----------
Add missing translations for Thai
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41086
| License | MIT
Add missing Thai translations to Security component.
Commits
-------
d3249baa06 Add missing translations for Thai
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] Remove duplicate catch block
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Spottet while reviewing https://github.com/symfony/symfony/pull/41576 by `@derrabus`
Commits
-------
32cac1c6f2 Remove duplicate catch block