8000 minor #26467 Add UsernameNotFoundException declaration to refreshUser… · src-run/symfony@e0f79f6 · GitHub
[go: up one dir, main page]

Skip to content

Commit e0f79f6

Browse files
committed
minor symfony#26467 Add UsernameNotFoundException declaration to refreshUser(). (umulmrum)
This PR was squashed before being merged into the 4.1-dev branch (closes symfony#26467). Discussion ---------- Add UsernameNotFoundException declaration to refreshUser(). | Q | A | ------------- | --- | Branch? | master | Bug fix? | maybe | New feature? | maybe | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Symfony\Component\Security\Core\User\UserProviderInterface::refreshUser() does not declare that implementations may throw a UsernameNotFoundException, although a) it makes sense, as the user could have been deleted since the last load, and b) the ContextListener already handles the UsernameNotFoundException. So it looks like someone thought of this, but simply forgot the annotation. Unsure if this is a bugfix or a feature, but as it doesn't change executed code, master should be soon enough. Commits ------- f7a0c46 Add UsernameNotFoundException declaration to refreshUser().
2 parents aab5772 + f7a0c46 commit e0f79f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Security/Core/User/UserProviderInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public function loadUserByUsername($username);
5757
*
5858
* @return UserInterface
5959
*
60-
* @throws UnsupportedUserException if the user is not supported
60+
* @throws UnsupportedUserException if the user is not supported
61+
* @throws UsernameNotFoundException if the user is not found
6162
*/
6263
public function refreshUser(UserInterface $user);
6364

0 commit comments

Comments
 (0)
0