diff --git a/UPGRADE-7.4.md b/UPGRADE-7.4.md new file mode 100644 index 0000000000000..9c248bf3589b0 --- /dev/null +++ b/UPGRADE-7.4.md @@ -0,0 +1,24 @@ +UPGRADE FROM 7.3 to 7.4 +======================= + +Symfony 7.4 is a minor release. According to the Symfony release process, there should be no significant +backward compatibility breaks. Minor backward compatibility breaks are prefixed in this document with +`[BC BREAK]`, make sure your code is compatible with these entries before upgrading. +Read more about this in the [Symfony documentation](https://symfony.com/doc/7.4/setup/upgrade_minor.html). + +If you're upgrading from a version below 7.3, follow the [7.3 upgrade guide](UPGRADE-7.3.md) first. + +Security +-------- + + * Add argument `$requestDecision` to `AuthenticatorInterface::supports()`; + it should be used to report the reason a request isn't supported. E.g: + + ```php + public function supports(Request $request, ?RequestDecision $requestDecision = null): ?bool + { + $requestDecision?->addReason('This authenticator does not support any request.'); + + return false; + } + ``` diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index f2706858e45cf..5ffa1a1b82a43 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -423,7 +423,9 @@
This authenticator did not support the request.
+ {% for reason in (authenticator.requestDecisionReasons ?? []) is empty ? ['This authenticator did not support the request.'] : authenticator.requestDecisionReasons %} +{{ reason }}
+ {% endfor %}