8000 Improve documentation of PasswordUpgraderInterface · symfony/security-core@7929409 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7929409

Browse files
stofnicolas-grekas
authored andcommitted
Improve documentation of PasswordUpgraderInterface
1 parent 41843c8 commit 7929409

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

User/PasswordUpgraderInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Security\Core\User;
1313

14+
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
15+
1416
/**
1517
* @author Nicolas Grekas <p@tchwork.com>
1618
*/
@@ -22,6 +24,8 @@ interface PasswordUpgraderInterface
2224
* This method should persist the new password in the user storage and update the $user object accordingly.
2325
* Because you don't want your users not being able to log in, this method should be opportunistic:
2426
* it's fine if it does nothing or if it fails without throwing any exception.
27+
*
28+
* @throws UnsupportedUserException if the implementation does not support that user
2529
*/
2630
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void;
2731
}

0 commit comments

Comments
 (0)
0