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

@@ -16,7 +16,6 @@ use Chill\MainBundle\Repository\UserRepositoryInterface;
use Chill\MainBundle\Test\PrepareClientTrait;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
/**
* @internal
@@ -34,7 +33,7 @@ final class UserControllerTest extends WebTestCase
$user = new User();
$user->setUsername('Test_user '.uniqid());
$user->setPassword(self::getContainer()->get(UserPasswordEncoderInterface::class)->encodePassword(
$user->setPassword(self::getContainer()->get(\Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface::class)->encodePassword(
$user,
'password'
));
@@ -138,9 +137,9 @@ final class UserControllerTest extends WebTestCase
protected function isPasswordValid($username, $password)
{
/** @var \Symfony\Component\Security\Core\Encoder\UserPasswordEncoder $passwordEncoder */
/** @var \Symfony\Component\PasswordHasher\Hasher\UserPasswordHasher $passwordEncoder */
$passwordEncoder = self::getContainer()
->get(UserPasswordEncoderInterface::class);
->get(\Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface::class);
$user = self::getContainer()->get(UserRepositoryInterface::class)
->findOneBy(['username' => $username]);