Fixed error preventing the service container from compiling

This commit is contained in:
Jan Böhmer 2023-05-27 20:46:02 +02:00
parent 55641a234c
commit c24019fd57
5 changed files with 10 additions and 9 deletions

View file

@ -24,6 +24,7 @@ namespace App\Repository;
use App\Entity\UserSystem\User;
use Doctrine\ORM\NonUniqueResultException;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
use Symfony\Component\Security\Core\User\UserInterface;
@ -82,7 +83,7 @@ final class UserRepository extends NamedDBElementRepository implements PasswordU
}
}
public function upgradePassword(UserInterface $user, string $newHashedPassword): void
public function upgradePassword(UserInterface|PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
{
if ($user instanceof User) {
$user->setPassword($newHashedPassword);