Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c7493f5

Browse filesBrowse files
minor #18278 use class constants instead of FQCN strings (xabbuh)
This PR was merged into the 3.1-dev branch. Discussion ---------- use class constants instead of FQCN strings | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #18211 (comment) | License | MIT | Doc PR | Commits ------- d4ec7dd use class constants instead of FQCN strings
2 parents 9e32a4d + d4ec7dd commit c7493f5
Copy full SHA for c7493f5

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Firewall/ContextListener.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
use Symfony\Component\HttpKernel\KernelEvents;
1818
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver;
1919
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface;
20+
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
21+
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
2022
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
2123
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
2224
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
@@ -60,7 +62,7 @@ public function __construct(TokenStorageInterface $tokenStorage, array $userProv
6062
$this->sessionKey = '_security_'.$contextKey;
6163
$this->logger = $logger;
6264
$this->dispatcher = $dispatcher;
63-
$this->trustResolver = $trustResolver ?: new AuthenticationTrustResolver('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken', 'Symfony\Component\Security\Core\Authentication\Token\RememberMeToken');
65+
$this->trustResolver = $trustResolver ?: new AuthenticationTrustResolver(AnonymousToken::class, RememberMeToken::class);
6466
}
6567

6668
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.