minor #26467 Add UsernameNotFoundException declaration to refreshUser(). (umulmrum)

This PR was squashed before being merged into the 4.1-dev branch (closes #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
-------

f7a0c46338 Add UsernameNotFoundException declaration to refreshUser().
This commit is contained in:
Fabien Potencier 2018-03-10 12:27:29 -06:00
commit e0f79f69be
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ interface UserProviderInterface
*
* @return UserInterface
*
* @throws UnsupportedUserException if the user is not supported
* @throws UnsupportedUserException if the user is not supported
* @throws UsernameNotFoundException if the user is not found
*/
public function refreshUser(UserInterface $user);