From b6a1d89ad22d4443d6d91717cd7a4b469f477abe Mon Sep 17 00:00:00 2001 From: Gunnstein Lye Date: Tue, 17 Oct 2017 10:56:40 +0200 Subject: [PATCH] Doc doesn't match authenticate() implementations The `AuthenticationManagerInterface::authenticate()` docblock was changed [way back when](https://github.com/symfony/symfony/commit/3d976388130e359750ccbe8a88819d8df0278784) to say it will never return null. But existing implementations [do](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php#L43) [return](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php#L41) [null](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php#L59). So I assume the doc is wrong, not the implementations. --- .../Core/Authentication/AuthenticationManagerInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php b/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php index c97d747d42610..a66a7741cff19 100644 --- a/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php @@ -27,7 +27,7 @@ interface AuthenticationManagerInterface * * @param TokenInterface $token The TokenInterface instance to authenticate * - * @return TokenInterface An authenticated TokenInterface instance, never null + * @return TokenInterface|null An authenticated TokenInterface instance, or null if the token is not supported * * @throws AuthenticationException if the authentication fails */