Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADE-8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Security/Core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down
10 changes: 3 additions & 7 deletions src/Symfony/Component/Security/Core/User/ChainUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @template-implements UserProviderInterface<UserInterface>
* @template-implements AttributesBasedUserProviderInterface<UserInterface>
*/
class ChainUserProvider implements UserProviderInterface, PasswordUpgraderInterface
class ChainUserProvider implements AttributesBasedUserProviderInterface, PasswordUpgraderInterface
{
/**
* @param iterable<array-key, UserProviderInterface> $providers
Expand All @@ -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) {
Expand Down
Loading