This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Handle failure when sending DATA
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
When an exception is thrown while sending an email via SMTP (ie. A attachment is not readable) the SMTP connection is left opened with a partial message sent.
This PR closes the connection (we can't abort after sending the `DATA` command) in such situation.
/cc @fabpot
Commits
-------
849211a780 Handle failure when sending DATA
This PR was squashed before being merged into the 5.1 branch.
Discussion
----------
[Security] Fix event propagation for globally registered security events
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
When new authenticator security is enabled, the `AuthenticatorManager` is using its own firewall-specific event dispatcher. To allow security events being listened to on the global level, `RegisterGlobalSecurityEventListenersPass` is there to automatically add globally registered event listeners to the firewall-specific event dispatchers.
`RegisterGlobalSecurityEventListenersPass` contains a list of events that are propagated, but unfortunately this list is incomplete as there are other events in `AuthenticatorManager` that would need too be propagated. So I added the missing (older) security events. These older events may also be registered by their name, rather than the FQN of the class, so I've also added those.
As this is targeting 5.1, I'll file another PR for the `AuthenticationTokenCreatedEvent` that was introduced in 5.2, as soon as this change was merged into 5.x.
On a note, I feel this "whitelist" approach to propagate security events to the global dispatcher isn't that great, because it's prone to error. Additional security events may be added in the future and adding these to `RegisterGlobalSecurityEventListenersPass` can easily be missed. When I added `AuthenticationTokenCreatedEvent` in PR #37359 I wasn't aware of this propagation mechanic existed and also no one reviewing the PR noticed it.
Additional changes:
- Typo fix :)
- The `array_uintersect` in `RegisterGlobalSecurityEventListenersPassTest` wasn't implemented correctly *
\* That function's behavior is really odd and easy to be used in the wrong way. The callback function isn't intended to return true/false for matching items, but return -1/0/1 like sorting functions. The tests seemingly only worked by chance as returning true/false is doing pretty much the opposite of what the callback function is supposed to do.
Commits
-------
1675864032 [Security] Fix event propagation for globally registered security events
This PR was merged into the 5.2 branch.
Discussion
----------
[TwigBridge] allow null values in form helpers
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #39591| License | MIT
| Doc PR |
Commits
-------
f908047c6b allow null values in form helpers
This PR was merged into the 4.4 branch.
Discussion
----------
[ProxyManagerBridge] fix PHP notice, switch to "friendsofphp/proxy-manager-lts"
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39089
| License | MIT
| Doc PR | -
I submitted the fix for #39089 on the origin library at https://github.com/Ocramius/ProxyManager/pull/646.
Because of the [versioning policy](6d45615155/version-support.md (dependency-upgrades)) in use at the origin library, this fix won't be available for PHP < 7.4.
We usually resort to monkey-patching to workaround the policy and still ship the fix for 4.4 (which supports PHP >= 7.1).
This time, and as explained in https://github.com/Ocramius/ProxyManager/issues/630, I propose to delegate the fix to [friendsofphp/proxy-manager-lts](https://github.com/FriendsOfPHP/proxy-manager-lts/). It already embeds the fix and a few others that allow us to remove most of the monkey-patching we had to accumulate over time.
Commits
-------
389f5304c7 [ProxyManagerBridge] fix PHP notice, switch to "friendsofphp/proxy-manager-lts"
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] Add RememberMe Badge to LoginLinkAuthenticator
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I'm replacing a custom home-made magic link authenticator by the Symfony one, and I missed this behavior. I had to use a EventListener to add the badge to the passeport.
I'm not sure, if the badge were missing on purpose /cc @weaverryan @wouterj
Commits
-------
d38fc4d678 Add RememberMe Badge to LoginLinkAuthenticator
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Notifier] Fix component version constraint in bridges
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | np
| Tickets | -
| License | MIT
| Doc PR | -
Composer does not resolve `~5.3.0` to 5.x-dev with `--prefer-lowest` actually.
Commits
-------
bcdd5da849 [Notifier] Fix component version constraint in bridges
This PR was squashed before being merged into the 5.1 branch.
Discussion
----------
[Notifier] [DX] Abstract test cases
| Q | A
| ------------- | ---
| Branch? | 5.1
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
This PR
* [x] adds a new _abstract_ `TransportTestCase`
* [x] adds a new _abstract_ `TransportFactoryTestCase` (code is mainly taken from the `Mailer/TransportFactoryTestCase`)
We have a lot of code duplication in the notifier bridges
### Todos
* [x] check if we want this
* [x] I would want to use Dsn strings (like already used in the notifier bridge tests) instead of objects for the providers, what do you think? For me it is more readably
* [x] update all bridges
* [x] Bump notifier to `~5.1.10`
### Questions
* [x] is it Ok to consider this a bugfix and merge into `5.1`?
* [x] shall I prefix the abstract test cases with `Abstract` ? As we did the same for Mailer, I would say no
@symfony/mergers have to change ^5.2 into ^5.2.1
Commits
-------
79379b71f4 [Notifier] [DX] Abstract test cases
This PR was merged into the 5.3-dev branch.
Discussion
----------
[DomCrawler] mark some methods as internal
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#18465
| License | MIT
| Doc PR |
Commits
-------
b8f742d68b mark some methods as internal
This PR was merged into the 5.2 branch.
Discussion
----------
[Notifier] [Discord] Use sprintf for exception message
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
Commits
-------
d9eb1a1f6e [Notifier] [Discord] Use sprintf for exception message
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] Update the ICU data to 68.2
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
4573965f74 [Intl] Update the ICU data to 68.2
This PR was merged into the 5.2 branch.
Discussion
----------
[Notifier] add "symfony/polyfill-mbstring" as dep of the Discord bridge
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
e61f0c50fa [Notifier] add "symfony/polyfill-mbstring" as dep of the Discord bridge
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Notifier] Bump conflict rules for all notifier bridges
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Commits
-------
fed253bf08 [Notifier] Bump conflict rules for all notifier bridges.
* 5.2:
Supports empty path for slack DSN
[SecurityBundle] Fix transient test
Bump Symfony version to 5.2.2
Update VERSION for 5.2.1
Update CHANGELOG for 5.2.1
Bump Symfony version to 5.1.11
[Notifier] GoogleChat/FreeMobile: Declare incompatibility with 5.3.
Update VERSION for 5.1.10
Update CHANGELOG for 5.1.10
Bump Symfony version to 4.4.19
Update VERSION for 4.4.18
Update CONTRIBUTORS for 4.4.18
Update CHANGELOG for 4.4.18
[Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock
* 5.1:
Bump Symfony version to 5.1.11
Update VERSION for 5.1.10
Update CHANGELOG for 5.1.10
Bump Symfony version to 4.4.19
Update VERSION for 4.4.18
Update CONTRIBUTORS for 4.4.18
Update CHANGELOG for 4.4.18
[Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock
* 4.4:
Bump Symfony version to 4.4.19
Update VERSION for 4.4.18
Update CONTRIBUTORS for 4.4.18
Update CHANGELOG for 4.4.18
[Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock
This PR was merged into the 5.2 branch.
Discussion
----------
Supports empty path for slack DSN
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
It's actually not possible to use a Slack DSN inspired by [the documentation](https://symfony.com/doc/current/notifier.html#chat-channel), ie: `slack://TOKEN@default?channel=CHANNEL` cause the path is null (must be `/`).
This PR allows to not specify a path.
Commits
-------
f8a95b3965 Supports empty path for slack DSN
This PR was merged into the 5.2 branch.
Discussion
----------
[Notifier] GoogleChat/FreeMobile: Declare incompatibility with 5.3
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR |N/A
I missed two bridges. 😓 @nicolas-grekas
Commits
-------
b9eca9fcc9 [Notifier] GoogleChat/FreeMobile: Declare incompatibility with 5.3.
This PR was merged into the 4.4 branch.
Discussion
----------
[Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N.A.
| License | MIT
| Doc PR | N.A.
DenormalizableInterface::denormalize() should not return anything, so the `@return` declaration should be removed. If you look at the usage in `CustomNormalizer::denormalize()`, it becomes clear that this method shouldn't return anything:
```php
public function denormalize($data, $type, $format = null, array $context = [])
{
$object = $this->extractObjectToPopulate($type, $context) ?: new $type();
$object->denormalize($this->serializer, $data, $format, $context);
return $object;
}
```
Commits
-------
00c90aed51 [Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock
This PR was merged into the 5.2 branch.
Discussion
----------
[SecurityBundle] Fix transient test
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
See e.g. https://travis-ci.com/github/symfony/symfony/jobs/462408658#L4961
Commits
-------
fd27c4dd97 [SecurityBundle] Fix transient test