Skip to content

Commit d8f8459

Browse files
authored
Use proper name for parameter of upgradePassword
encode is the wrong term symfony tries to remove. The paramter is also called $newHashedPassword in the PasswordUpgraderInterface
1 parent 4edd87e commit d8f8459

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Resources/skeleton/doctrine/Repository.tpl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ public function __construct(ManagerRegistry $registry)
2929
/**
3030
* Used to upgrade (rehash) the user's password automatically over time.
3131
*/
32-
public function upgradePassword(<?= sprintf('%s ', $password_upgrade_user_interface->getShortName()); ?>$user, string $newEncodedPassword): void
32+
public function upgradePassword(<?= sprintf('%s ', $password_upgrade_user_interface->getShortName()); ?>$user, string $newHashedPassword): void
3333
{
3434
if (!$user instanceof <?= $entity_class_name ?>) {
3535
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', \get_class($user)));
3636
}
3737

38-
$user->setPassword($newEncodedPassword);
38+
$user->setPassword($newHashedPassword);
3939
$this->_em->persist($user);
4040
$this->_em->flush();
4141
}

0 commit comments

Comments
 (0)