Skip to content

Commit 492d66e

Browse files
committed
minor symfony#14578 [Securty] PhpDoc fix in AbstractRememberMeServices (MacDada)
This PR was merged into the 2.3 branch. Discussion ---------- [Securty] PhpDoc fix in AbstractRememberMeServices | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | no | License | MIT | Doc PR | no All extending classes return `UserInterface`, not `TokenInterface`: * https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php#L64 * https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php#L116 And `AbstractRememberMeServices` actually requires the return value to be `UserInterface`: ``` $user = $this->processAutoLoginCookie($cookieParts, $request); if (!$user instanceof UserInterface) { throw new \RuntimeException('processAutoLoginCookie() must return a UserInterface implementation.'); } ``` Commits ------- a73d2cc PhpDoc fix in AbstractRememberMeServices
2 parents a955598 + a73d2cc commit 492d66e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ final public function loginSuccess(Request $request, Response $response, TokenIn
217217
* @param array $cookieParts
218218
* @param Request $request
219219
*
220-
* @return TokenInterface
220+
* @return UserInterface
221221
*/
222222
abstract protected function processAutoLoginCookie(array $cookieParts, Request $request);
223223

0 commit comments

Comments
 (0)