diff --git a/security/passwords.rst b/security/passwords.rst index 7a956d44b1d..6cd70f10a9b 100644 --- a/security/passwords.rst +++ b/security/passwords.rst @@ -464,13 +464,14 @@ storing the newly created password hash:: namespace App\Repository; // ... + use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; class UserRepository extends EntityRepository implements PasswordUpgraderInterface { // ... - public function upgradePassword(UserInterface $user, string $newHashedPassword): void + public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void { // set the new hashed password on the User object $user->setPassword($newHashedPassword);