mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -15,7 +15,6 @@ use Chill\MainBundle\Entity\User;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\NoResultException;
|
||||
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
|
||||
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
|
||||
@@ -36,7 +35,7 @@ class UserProvider implements UserProviderInterface
|
||||
->setParameter('pattern', $username)
|
||||
->getSingleResult();
|
||||
} catch (NoResultException $e) {
|
||||
throw new UsernameNotFoundException('Bad credentials.', 0, $e);
|
||||
throw new \Symfony\Component\Security\Core\Exception\UserNotFoundException('Bad credentials.', 0, $e);
|
||||
}
|
||||
|
||||
return $user;
|
||||
@@ -51,7 +50,7 @@ class UserProvider implements UserProviderInterface
|
||||
$reloadedUser = $this->em->getRepository(User::class)->find($user->getId());
|
||||
|
||||
if (null === $reloadedUser) {
|
||||
throw new UsernameNotFoundException(sprintf('User with ID "%s" could not be reloaded.', $user->getId()));
|
||||
throw new \Symfony\Component\Security\Core\Exception\UserNotFoundException(sprintf('User with ID "%s" could not be reloaded.', $user->getId()));
|
||||
}
|
||||
|
||||
return $reloadedUser;
|
||||
|
Reference in New Issue
Block a user