Skip to content

Commit 587c360

Browse files
authored
Refactor password hashing method in security.rst
Method "hashPassword" does not exist in Symfony\Component\PasswordHasher\PasswordHasherInterface in Symfony 7.3
1 parent 2e37fd5 commit 587c360

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

security.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,7 @@ the database::
426426
$plaintextPassword = ...;
427427

428428
// hash the password (based on the security.yaml config for the $user class)
429-
$hashedPassword = $passwordHasher->hashPassword(
430-
$user,
431-
$plaintextPassword
432-
);
429+
$hashedPassword = $this->passwordHasher->hash($plaintextPassword);
433430
$user->setPassword($hashedPassword);
434431

435432
// ...

0 commit comments

Comments
 (0)