This PR was merged into the 3.4 branch.
Discussion
----------
Backport: Improve link script with rollback when using symlink
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | no
| 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
Backports #37915 to 3.4.
Even if it's a new feature, it's a contributors tool that can be used for any version to try out.
Commits
-------
ab92e9f4c3 Backport: Improve link script with rollback when using symlink
This PR was submitted for the 3.4 branch but it was merged into the 5.2-dev branch instead.
Discussion
----------
[FrameworkBundle] Make AbstractPhpFileCacheWarmer public
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
Introducing the PhpArrayAdapter was a great feature. It has proven itself well in the production.
Actually, using the adapter is closely related to warming up the cache for it. FrameworkBundle has an AbstractPhpFileCacheWarmer for conveniently creating a custom warmer.
But using it outside of the FrameworkBundle becomes more complicated because it is marked as internal.
I propose making it public and allow it to be used outside of the FrameworkBundle.
For example, I've proposed to cache Doctrine metadata using PhpArrayAdapter and the implementation uses AbstractPhpFileCacheWarmer https://github.com/doctrine/DoctrineBundle/pull/1196
Commits
-------
a0fb44238e Make AbstractPhpFileCacheWarmer public
This PR was merged into the 5.2-dev branch.
Discussion
----------
[PropertyInfo] ConstructorExtractor which has higher priority than PhpDocExtractor and ReflectionExtractor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | hopefully no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30053
| License | MIT
Supersedes #30056#30128
In short, when using PhpDocExtractor, it ignores the constructor argument type, although `argument types from the constructor are the only types that are valid for the class instantiation`.
This PR adds a separate extractor - `ConstructorExtractor` which is called first (-999) and it attempts to extract the type from constructor only, either from PhpDoc or using reflection.
I added `getTypesFromConstructor` to `PhpDocExtractor` and `ReflectionExtractor` - they implement `ConstructorArgumentTypeExtractorInterface` interface. `ConstructorExtractor` aggregates those extractors using compiler pass.
So the flow of control looks like this:
```
PropertyInfoExtractor::getTypes:
- ConstructorExtractor::getTypes
- PhpDocExtractor::getTypesFromConstructor
- ReflectionExtractor::getTypesFromConstructor
- PhpDocExtractor::getTypes
- ReflectionExtractor::getTypes
```
Commits
-------
5049e25b01 Added ConstructorExtractor which has higher priority than PhpDocExtractor and ReflectionExtractor
This PR was merged into the 5.2-dev branch.
Discussion
----------
[lock] Lazy create table in lock PDO store
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | /
| License | MIT
| Doc PR | TODO
With this PR, the table used by PdoStore is automatically created (similar to Cache and Messenger componenents)
Commits
-------
eaa52bae96 Lazy create table in lock PDO store
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.
Discussion
----------
[Yaml] fix more numeric cases changing in PHP 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | 968ffcfa65 (r41697638)
| License | MIT
| Doc PR |
see also https://wiki.php.net/rfc/saner-numeric-strings
Commits
-------
7cd5106041 fix more numeric cases changing in PHP 8
This PR was merged into the 5.1 branch.
Discussion
----------
[Security] Fixed RememberMeAuthenticator::autoLogin() logic in the authenticator
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37534
| License | MIT
| Doc PR | n/a
The `RememberMeAuthenticator` wrongly assumed the implementation details of `AbstractRememberMeServices::autoLogin()`. This means that (a) the authenticator did not work with other - custom - implementations of `RememberMeServicesInterface` and (b) there was a potentional to get an "Call to a member function getUser() on null" error.
This code removes all assumptions of the `autoLogin()` logic, other than that stated in the PHPdoc: 32ca714e93/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php (L43-L53)
Commits
-------
93aea910d9 Fixed autoLogin() returning null
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Serializer] Add special '*' serialization group that allows any group
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32622
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Hi,
I added support for a special serialization group: '*'.
This group lets any group serialize the attribute marked with it.
The BC break comes from the fact that someone could have used the '*' group in their code.
Commits
-------
54e24a8999 [Serializer] Add special '*' serialization group that allows any group
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
Allow Drupal to wrap the Symfony test listener
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | kinda
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| 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 -->
Drupal has a test listener that wraps the Symfony listener as we need to manipulate deprecation testing to skip specific deprecations. We've managed to remove some how custom stuff and reaching into Symfony's privates via reflection recently (and fix a bug or two) but now we're getting output like:
```
2x: a:4:{s:11:"deprecation";s:191:"Calling Drupal\Tests\WebAssert::responseNotMatches with more than one argument is deprecated in drupal:9.1.0 and will throw an exception in drupal:10.0.0. See https://www.drupal.org/node/TODO";s:5:"class";s:52:"Drupal\Tests\comment\Functional\CommentAnonymousTest";s:6:"method";s:13:"testAnonymous";s:15:"triggering_file";s:74:"/Users/alex/dev/sites/drupal8alt.dev/core/tests/Drupal/Tests/WebAssert.php";}
2x in DrupalListener::endTest from Drupal\Tests\Listeners
```
instead of
```
2x: Calling Drupal\Tests\WebAssert::responseNotMatches with more than one argument is deprecated in drupal:9.1.0 and will throw an exception in drupal:10.0.0. See https://www.drupal.org/node/TODO
2x in CommentAnonymousTest::testAnonymous from Drupal\Tests\comment\Functional
```
We can fix this by aliasing and copying the \Symfony\Bridge\PhpUnit\DeprecationErrorHandler\Deprecation class but ideally that class could be a bit more liberal in its implementation.
Commits
-------
91de46da3f Allow Drupal to wrap the Symfony test listener
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Serializer] Adds FormErrorNormalizer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#27428
| License | MIT
| Doc PR | symfony/symfony-docs#13885
<!--
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.
-->
# Readme
Adds `FormErrorNormalizer` for AJAX forms (see the suggestion: #27428). It was on the [FOSRestBundle](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Serializer/Normalizer/FormErrorNormalizer.php) and now it is implemented in the `Serializer` component.
# Roadmap
- [x] Core of the class
- [x] Output syntax
- [x] Support of the children forms
- [x] Doc
Commits
-------
dcb8d8b05d [Serializer] Adds FormErrorNormalizer
This PR was merged into the 5.1 branch.
Discussion
----------
[Notifier] backport documentation changes
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
I think #37809 should have been merged into the `5.1` branch.
Commits
-------
ff768fbdd9 [Notifier] add doc for free mobile dsn
This PR was merged into the 5.1 branch.
Discussion
----------
[Mailer] Support Return-Path in SesApiAsyncAwsTransport
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Enable sending `SendEmailRequest`s with a `Return-Path` configured in
`SesApiAsyncAwsTransport`.
Commits
-------
61754cb891 [Mailer] Support Return-Path in SesApiAsyncAwsTransport
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Messenger] Add FlattenException Normalizer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#32719 ... <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | No 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.
-->
I have just duplicated the PR https://github.com/symfony/symfony/pull/33650 (from @skalpa) but using the new component ErrorHandler and removing the priority.
Project that reproduces the bug on Symfony 5.2: https://github.com/monteiro/serializer-pr37087 (all steps are on the README).
Since this adds a new class and changes behavior, we add this new feature on the 5.2 branch.
Commits
-------
78fbd0ac77 [Messenger] Add FlattenException Normalizer
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Security] Pass Passport to LoginFailureEvent
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#37585
| License | MIT
| Doc PR | -
This changes passes a `Passport` to the `LoginFailureEvent`.
Commits
-------
d23434bc23 [Security] Pass Passport to LoginFailureEvent
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[HttpFoundation] add support for X_FORWARDED_PREFIX header
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#36809
| License | MIT
Add support for `X-Forwarded-Prefix` header added by the popular Traefik HTTP LoadBalancer and Reverse Proxy. This ensures that the links rendered by symfony application deployed behind LB are valid even if the application is deployed via prefix URL.
Example routing setup:
route `/admin/(.*)` => symfony backend `/$1`
in this case links rendered by symfony backend must start with `/admin/`
To accept traefik prefix in your symfony app, you must modify index.php to allow accepting this header:
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_TRAEFIK ^ Request::HEADER_X_FORWARDED_HOST );`
Commits
-------
109e0a9f1a [HttpFoundation] add support for X_FORWARDED_PREFIX header
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Mailer] Support Amazon SES ConfigurationSetName
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
In Amazon SES a Configuration Set can be used to monitor email sending
events (delivery, bounces, complaints etc.). In order to use this
feature the ConfigurationSetName needs to be sent along with the email.
Setting the `X-SES-CONFIGURATION-SET` header should accomplish this for
all SES Transports now.
Ref: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets-in-email.html
Commits
-------
a36fec3204 [Mailer] Support Amazon SES ConfigurationSetName
This PR was merged into the 5.2-dev branch.
Discussion
----------
Improve link script with rollback when using symlink
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Improve when dev `symfony/symfony` with local project
| License | MIT
| Doc PR | .
Hi, this just `rollback` the local project state when finishing testing via `symlink` (default)
Commits
-------
abf40ceb40 Improve link script with rollback when using symlink
This PR was merged into the 3.4 branch.
Discussion
----------
[ExpressionLanguage] fix passing arguments to call_user_func_array() on PHP 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
a55ce7c8bb fix passing arguments to call_user_func_array() on PHP 8
In Amazon SES a Configuration Set can be used to monitor email sending
events (delivery, bounces, complaints etc.). In order to use this
feature the ConfigurationSetName needs to be sent along with the email.
Setting the `X-SES-CONFIGURATION-SET` header should accomplish this for
all SES Transports now.
Ref: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets-in-email.html