Skip to content

Commit 931ccfc

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [SecurityHttp] Fix incompatibility with 6.0 [SecurityGuard] Fix incompatibility with 6.0 [SecurityBundle] Fix incompatibility with 6.0 [FrameworkBundle] Fix incompatibility with 6.0 [SecurityHttp] Fix incompatibility with 6.0 [PasswordHasher] Fix incompatibility with 6.0 [MonologBridge] Fix incompatibility with 6.0 [Security] Minor fixes [Security] Fix wrong cache directive when using the new PUBLIC_ACCESS attribute
2 parents 8a43089 + dba188c commit 931ccfc

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

AuthenticationEvents.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ final class AuthenticationEvents
2929
* authenticated by any of the providers.
3030
*
3131
* @Event("Symfony\Component\Security\Core\Event\AuthenticationFailureEvent")
32+
*
33+
* @deprecated since Symfony 5.4, use {@see Event\LoginFailureEvent} instead
3234
*/
3335
public const AUTHENTICATION_FAILURE = 'security.authentication.failure';
3436

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CHANGELOG
1212
5.4
1313
---
1414

15+
* Deprecate `AuthenticationEvents::AUTHENTICATION_FAILURE`, use the `LoginFailureEvent` instead
1516
* Deprecate `AnonymousToken`, as the related authenticator was deprecated in 5.3
1617
* Deprecate `Token::getCredentials()`, tokens should no longer contain credentials (as they represent authenticated sessions)
1718
* Deprecate returning `string|\Stringable` from `Token::getUser()` (it must return a `UserInterface`)

User/ChainUserProvider.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,25 @@ public function loadUserByUsername(string $username)
5656
return $this->loadUserByIdentifier($username);
5757
}
5858

59-
public function loadUserByIdentifier(string $userIdentifier): UserInterface
59+
public function loadUserByIdentifier(string $identifier): UserInterface
6060
{
6161
foreach ($this->providers as $provider) {
6262
try {
6363
// @deprecated since Symfony 5.3, change to $provider->loadUserByIdentifier() in 6.0
6464
if (!method_exists($provider, 'loadUserByIdentifier')) {
6565
trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($provider));
6666

67-
return $provider->loadUserByUsername($userIdentifier);
67+
return $provider->loadUserByUsername($identifier);
6868
}
6969

70-
return $provider->loadUserByIdentifier($userIdentifier);
70+
return $provider->loadUserByIdentifier($identifier);
7171
} catch (UserNotFoundException $e) {
7272
// try next one
7373
}
7474
}
7575

76-
$ex = new UserNotFoundException(sprintf('There is no user with identifier "%s".', $userIdentifier));
77-
$ex->setUserIdentifier($userIdentifier);
76+
$ex = new UserNotFoundException(sprintf('There is no user with identifier "%s".', $identifier));
77+
$ex->setUserIdentifier($identifier);
7878
throw $ex;
7979
}
8080

0 commit comments

Comments
 (0)