Skip to content

Commit 66a2008

Browse files
committed
minor #17989 [Security] updated the casted interface name as per the implemented interface (prakash)
This PR was merged into the 6.2 branch. Discussion ---------- [Security] updated the casted interface name as per the implemented interface <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- 8bbc854 updated the casted interface name as per the implemented interface
2 parents dd90e0a + 8bbc854 commit 66a2008

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

security/passwords.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,13 +464,14 @@ storing the newly created password hash::
464464
namespace App\Repository;
465465

466466
// ...
467+
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
467468
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
468469

469470
class UserRepository extends EntityRepository implements PasswordUpgraderInterface
470471
{
471472
// ...
472473

473-
public function upgradePassword(UserInterface $user, string $newHashedPassword): void
474+
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
474475
{
475476
// set the new hashed password on the User object
476477
$user->setPassword($newHashedPassword);

0 commit comments

Comments
 (0)