Apply rector rules: symfony up to 54

This commit is contained in:
2024-04-04 23:30:25 +02:00
parent 1ee3b9e2f0
commit 579bd829f8
204 changed files with 974 additions and 2346 deletions

View File

@@ -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;