Skip to content

Commit 1d6ac79

Browse files
minor #61594 [Security] Make UserChainProvider implement AttributesBasedUserProvider (valtzu)
This PR was merged into the 8.0 branch. Discussion ---------- [Security] Make `UserChainProvider` implement `AttributesBasedUserProvider` | Q | A | ------------- | --- | Branch? | 8.0 | Bug fix? | no | New feature? | yes | Deprecations? | no | License | MIT Related to #61548 Commits ------- 7d9a6d1 [Security] Make `UserChainProvider` implement `AttributesBasedUserProviderInterface`
2 parents 64294e4 + 7d9a6d1 commit 1d6ac79

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

UPGRADE-8.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ Security
387387
* Add argument `$vote` to `VoterInterface::vote()` and `Voter::voteOnAttribute()`
388388
* Add argument `$token` to `UserCheckerInterface::checkPostAuth()`
389389
* Add argument `$attributes` to `UserAuthenticatorInterface::authenticateUser()`
390+
* Make `UserChainProvider` implement `AttributesBasedUserProviderInterface`
390391

391392
SecurityBundle
392393
--------------

src/Symfony/Component/Security/Core/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CHANGELOG
1010
* Add argument `$accessDecision` to `AccessDecisionManagerInterface::decide()` and `AuthorizationCheckerInterface::isGranted()`
1111
* Add argument `$vote` to `VoterInterface::vote()` and `Voter::voteOnAttribute()`
1212
* Add argument `$token` to `UserCheckerInterface::checkPostAuth()`
13+
* Make `UserChainProvider` implement `AttributesBasedUserProviderInterface`
1314

1415
7.3
1516
---

src/Symfony/Component/Security/Core/User/ChainUserProvider.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
*
2323
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
2424
*
25-
* @template-implements UserProviderInterface<UserInterface>
25+
* @template-implements AttributesBasedUserProviderInterface<UserInterface>
2626
*/
27-
class ChainUserProvider implements UserProviderInterface, PasswordUpgraderInterface
27+
class ChainUserProvider implements AttributesBasedUserProviderInterface, PasswordUpgraderInterface
2828
{
2929
/**
3030
* @param iterable<array-key, UserProviderInterface> $providers
@@ -46,12 +46,8 @@ public function getProviders(): array
4646
return $this->providers;
4747
}
4848

49-
/**
50-
* @param array $attributes
51-
*/
52-
public function loadUserByIdentifier(string $identifier/* , array $attributes = [] */): UserInterface
49+
public function loadUserByIdentifier(string $identifier, array $attributes = []): UserInterface
5350
{
54-
$attributes = \func_num_args() > 1 ? func_get_arg(1) : [];
5551
foreach ($this->providers as $provider) {
5652
try {
5753
if ($provider instanceof AttributesBasedUserProviderInterface) {

0 commit comments

Comments
 (0)