From 587c36004a4240f9dca709bb2ad6a8f3512ffca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9stor=20Brito?= Date: Wed, 5 Nov 2025 08:42:04 +0100 Subject: [PATCH] Refactor password hashing method in security.rst Method "hashPassword" does not exist in Symfony\Component\PasswordHasher\PasswordHasherInterface in Symfony 7.3 --- security.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/security.rst b/security.rst index bc394fd95b8..18b2467f39d 100644 --- a/security.rst +++ b/security.rst @@ -426,10 +426,7 @@ the database:: $plaintextPassword = ...; // hash the password (based on the security.yaml config for the $user class) - $hashedPassword = $passwordHasher->hashPassword( - $user, - $plaintextPassword - ); + $hashedPassword = $this->passwordHasher->hash($plaintextPassword); $user->setPassword($hashedPassword); // ...