Skip to content

Commit 4963c85

Browse files
committed
[Security] Fix typehint in custom user provider
1 parent be6a0ca commit 4963c85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

security/user_providers.rst

+2-1
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;
@@ -335,7 +336,7 @@ command will generate a nice skeleton to get you started::
335336
/**
336337
* Upgrades the encoded 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 $newEncodedPassword): void
339340
{
340341
// TODO: when encoded passwords are in use, this method should:
341342
// 1. persist the new password in the user storage

0 commit comments

Comments
 (0)