Skip to content

Commit 9fc3698

Browse files
committed
Mention what you should throw in your UserProvider
1 parent 2664394 commit 9fc3698

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Resources/skeleton/security/UserProvider.tpl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class <?= $class_name ?> implements UserProviderInterface
1717
* this method.
1818
*
1919
* @return UserInterface
20+
*
21+
* @throws UsernameNotFoundException if the user is not found
2022
*/
2123
public function loadUserByUsername($username)
2224
{
@@ -46,8 +48,6 @@ public function refreshUser(UserInterface $user)
4648
throw new UnsupportedUserException(sprintf('Invalid user class "%s".', get_class($user)));
4749
}
4850

49-
/* @var <?= $user_short_name ?> $user */
50-
5151
// Return a User object after making sure its data is "fresh".
5252
// Or throw a UsernameNotFoundException if the user no longer exists.
5353
throw new \Exception('TODO: fill in refreshUser() inside '.__FILE__);

0 commit comments

Comments
 (0)