Skip to content

Commit 5a95212

Browse files
committed
minor #19396 [Security] [DOC] Update passwords.rst (lbbyf)
This PR was submitted for the 7.0 branch but it was merged into the 6.3 branch instead. Discussion ---------- [Security] [DOC] Update passwords.rst The signature of the needsRehash method of the `SymfonyComponentPasswordHasher\Hasher\UserPasswordHasherInterface` interface is `public function needsRehash(PasswordAuthenticatedUserInterface $user): bool;`. If we use the method `public function needsRehash(string $hashedPassword): bool;`, then the interface should be `Symfony\Component\PasswordHasher\PasswordHasherInterface`. <!-- 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 ------- 088a4f3 [DOC][SECURITY] Update passwords.rst
2 parents 437b6f8 + 088a4f3 commit 5a95212

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

security/passwords.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,13 +518,13 @@ migration by returning ``true`` in the ``needsRehash()`` method::
518518
namespace App\Security;
519519

520520
// ...
521-
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
521+
use Symfony\Component\PasswordHasher\PasswordHasherInterface;
522522

523-
class CustomPasswordHasher implements UserPasswordHasherInterface
523+
class CustomPasswordHasher implements PasswordHasherInterface
524524
{
525525
// ...
526526

527-
public function needsRehash(string $hashed): bool
527+
public function needsRehash(string $hashedPassword): bool
528528
{
529529
// check whether the current password is hashed using an outdated hasher
530530
$hashIsOutdated = ...;

0 commit comments

Comments
 (0)