Skip to content

Commit a0ceb91

Browse files
committed
Fix symfony 5.3 incompatibility
1 parent 04d6fad commit a0ceb91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Domain/SecurityIdentityRetrievalStrategy.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Symfony\Component\Security\Core\Authentication\Token\NullToken;
1818
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1919
use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter;
20+
use Symfony\Component\Security\Core\Authorization\Voter\CacheableVoterInterface;
2021
use Symfony\Component\Security\Core\Role\RoleHierarchyInterface;
2122

2223
/**
@@ -78,7 +79,7 @@ public function getSecurityIdentities(TokenInterface $token)
7879

7980
private function isNotAuthenticated(TokenInterface $token): bool
8081
{
81-
if (\defined('\Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter::PUBLIC_ACCESS')) {
82+
if (interface_exists(CacheableVoterInterface::class)) {
8283
return !$this->authenticationTrustResolver->isAuthenticated($token);
8384
}
8485

0 commit comments

Comments
 (0)