8000 use class constants instead of FQCN strings · symfony/symfony@d4ec7dd · GitHub
[go: up one dir, main page]

Skip to content

Commit d4ec7dd

Browse files
committed
use class constants instead of FQCN strings
1 parent 434a2f5 commit d4ec7dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines 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