From 0af9a84f4e6853c09726a675350b96b4df57cf95 Mon Sep 17 00:00:00 2001 From: Andrey Bolonin Date: Fri, 4 Jul 2025 22:10:02 +0300 Subject: [PATCH 1/2] Update passwords.rst --- security/passwords.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/passwords.rst b/security/passwords.rst index 7f05bc3acb9..5578b9f3c00 100644 --- a/security/passwords.rst +++ b/security/passwords.rst @@ -626,7 +626,7 @@ you must register a service for it in order to use it as a named hasher: security: # ... password_hashers: - app_hasher: + App\Entity\User: id: 'App\Security\Hasher\MyCustomPasswordHasher' .. code-block:: xml @@ -842,7 +842,7 @@ Now, define a password hasher using the ``id`` setting: security: # ... password_hashers: - app_hasher: + App\Entity\User: # the service ID of your custom hasher (the FQCN using the default services.yaml) id: 'App\Security\Hasher\MyCustomPasswordHasher' From f5b608544c51cb414036045939012f7a5ed251c4 Mon Sep 17 00:00:00 2001 From: Andrey Bolonin Date: Wed, 23 Jul 2025 06:43:27 +0300 Subject: [PATCH 2/2] Update passwords.rst --- security/passwords.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/security/passwords.rst b/security/passwords.rst index 5578b9f3c00..f8ce8b77eb0 100644 --- a/security/passwords.rst +++ b/security/passwords.rst @@ -644,7 +644,7 @@ you must register a service for it in order to use it as a named hasher: - @@ -657,12 +657,12 @@ you must register a service for it in order to use it as a named hasher: return static function (SecurityConfig $security): void { // ... - $security->passwordHasher('app_hasher') + $security->passwordHasher('App\Entity\User') ->id(MyCustomPasswordHasher::class) ; }; -This creates a hasher named ``app_hasher`` from a service with the ID +This creates a hasher named ``App\Entity\User`` from a service with the ID ``App\Security\Hasher\MyCustomPasswordHasher``. Hashing a Stand-Alone String @@ -862,7 +862,7 @@ Now, define a password hasher using the ``id`` setting: - @@ -875,7 +875,7 @@ Now, define a password hasher using the ``id`` setting: return static function (SecurityConfig $security): void { // ... - $security->passwordHasher('app_hasher') + $security->passwordHasher('App\Entity\User') // the service ID of your custom hasher (the FQCN using the default services.yaml) ->id(CustomVerySecureHasher::class) ;