File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 17
17
use Symfony \Component \Security \Core \Authentication \Token \NullToken ;
18
18
use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
19
19
use Symfony \Component \Security \Core \Authorization \Voter \AuthenticatedVoter ;
20
+ use Symfony \Component \Security \Core \Authorization \Voter \CacheableVoterInterface ;
20
21
use Symfony \Component \Security \Core \Role \RoleHierarchyInterface ;
21
22
22
23
/**
@@ -78,7 +79,7 @@ public function getSecurityIdentities(TokenInterface $token)
78
79
79
80
private function isNotAuthenticated (TokenInterface $ token ): bool
80
81
{
81
- if (\defined ( ' \Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter::PUBLIC_ACCESS ' )) {
82
+ if (interface_exists (CacheableVoterInterface::class )) {
82
83
return !$ this ->authenticationTrustResolver ->isAuthenticated ($ token );
83
84
}
84
85
You can’t perform that action at this time.
0 commit comments