Skip to content

Commit 4054936

Browse files
committed
feature #291 Mention what you should throw in your UserProvider (weaverryan)
This PR was squashed before being merged into the 1.0-dev branch (closes #291). Discussion ---------- Mention what you should throw in your UserProvider A tip from @iltar to make things more clear :) Commits ------- 9fc3698 Mention what you should throw in your UserProvider
2 parents 2664394 + 9fc3698 commit 4054936

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)