Skip to content

Commit b90ce05

Browse files
minor symfony#24316 Added null as explicit return type (?TokenInterface) (iltar)
This PR was merged into the 2.7 branch. Discussion ---------- Added null as explicit return type (?TokenInterface) | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#23882 (comment) | License | MIT | Doc PR | ~ This fixes the returntype in the `ContextListener` so it can be merged upwards. /cc @chalasr Commits ------- 1ba4dd9 Added null as explicit return type (?TokenInterface)
2 parents 3128cfd + 1ba4dd9 commit b90ce05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Security/Http/Firewall/ContextListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ protected function refreshUser(TokenInterface $token)
174174
}
175175

176176
if ($userNotFoundByProvider) {
177-
return;
177+
return null;
178178
}
179179

180180
throw new \RuntimeException(sprintf('There is no user provider for user "%s".', get_class($user)));

0 commit comments

Comments
 (0)