Skip to content

Commit 8a39d97

Browse files
[Security] fix compat with security-core v6
1 parent 8071d6b commit 8a39d97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Authenticator/RememberMeAuthenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2121
use Symfony\Component\Security\Core\Exception\CookieTheftException;
2222
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
23-
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
23+
use Symfony\Component\Security\Core\Exception\UserNotFoundException;
2424
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
2525
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
2626
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
@@ -119,7 +119,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
119119
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
120120
{
121121
if (null !== $this->logger) {
122-
if ($exception instanceof UsernameNotFoundException) {
122+
if ($exception instanceof UserNotFoundException) {
123123
$this->logger->info('User for remember-me cookie not found.', ['exception' => $exception]);
124124
} elseif ($exception instanceof UnsupportedUserException) {
125125
$this->logger->warning('User class for remember-me cookie not supported.', ['exception' => $exception]);

0 commit comments

Comments
 (0)