diff --git a/UPGRADE-8.0.md b/UPGRADE-8.0.md index 8399e0f3e027..e6962af922b6 100644 --- a/UPGRADE-8.0.md +++ b/UPGRADE-8.0.md @@ -387,6 +387,7 @@ Security * Add argument `$vote` to `VoterInterface::vote()` and `Voter::voteOnAttribute()` * Add argument `$token` to `UserCheckerInterface::checkPostAuth()` * Add argument `$attributes` to `UserAuthenticatorInterface::authenticateUser()` + * Make `UserChainProvider` implement `AttributesBasedUserProviderInterface` SecurityBundle -------------- diff --git a/src/Symfony/Component/Security/Core/CHANGELOG.md b/src/Symfony/Component/Security/Core/CHANGELOG.md index 6d21eb74ced8..e30f7be7aa7c 100644 --- a/src/Symfony/Component/Security/Core/CHANGELOG.md +++ b/src/Symfony/Component/Security/Core/CHANGELOG.md @@ -10,6 +10,7 @@ CHANGELOG * Add argument `$accessDecision` to `AccessDecisionManagerInterface::decide()` and `AuthorizationCheckerInterface::isGranted()` * Add argument `$vote` to `VoterInterface::vote()` and `Voter::voteOnAttribute()` * Add argument `$token` to `UserCheckerInterface::checkPostAuth()` + * Make `UserChainProvider` implement `AttributesBasedUserProviderInterface` 7.3 --- diff --git a/src/Symfony/Component/Security/Core/User/ChainUserProvider.php b/src/Symfony/Component/Security/Core/User/ChainUserProvider.php index cacb95507622..061da4e9dab1 100644 --- a/src/Symfony/Component/Security/Core/User/ChainUserProvider.php +++ b/src/Symfony/Component/Security/Core/User/ChainUserProvider.php @@ -22,9 +22,9 @@ * * @author Johannes M. Schmitt * - * @template-implements UserProviderInterface + * @template-implements AttributesBasedUserProviderInterface */ -class ChainUserProvider implements UserProviderInterface, PasswordUpgraderInterface +class ChainUserProvider implements AttributesBasedUserProviderInterface, PasswordUpgraderInterface { /** * @param iterable $providers @@ -46,12 +46,8 @@ public function getProviders(): array return $this->providers; } - /** - * @param array $attributes - */ - public function loadUserByIdentifier(string $identifier/* , array $attributes = [] */): UserInterface + public function loadUserByIdentifier(string $identifier, array $attributes = []): UserInterface { - $attributes = \func_num_args() > 1 ? func_get_arg(1) : []; foreach ($this->providers as $provider) { try { if ($provider instanceof AttributesBasedUserProviderInterface) {