Skip to content

Commit 766077f

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Security] Fix typehint in custom user provider
2 parents 5eb3931 + 7cfe1de commit 766077f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

security/user_providers.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ command will generate a nice skeleton to get you started::
279279

280280
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
281281
use Symfony\Component\Security\Core\Exception\UserNotFoundException;
282+
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
282283
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
283284
use Symfony\Component\Security\Core\User\UserInterface;
284285
use Symfony\Component\Security\Core\User\UserProviderInterface;
@@ -333,13 +334,13 @@ command will generate a nice skeleton to get you started::
333334
}
334335

335336
/**
336-
* Upgrades the encoded password of a user, typically for using a better hash algorithm.
337+
* Upgrades the hashed password of a user, typically for using a better hash algorithm.
337338
*/
338-
public function upgradePassword(UserInterface $user, string $newEncodedPassword): void
339+
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
339340
{
340-
// TODO: when encoded passwords are in use, this method should:
341+
// TODO: when hashed passwords are in use, this method should:
341342
// 1. persist the new password in the user storage
342-
// 2. update the $user object with $user->setPassword($newEncodedPassword);
343+
// 2. update the $user object with $user->setPassword($newHashedPassword);
343344
}
344345
}
345346

0 commit comments

Comments
 (0)