Skip to content

Commit

Permalink
Fix symfony 5.3 incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
acrobat committed Feb 14, 2022
1 parent 04d6fad commit a0ceb91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Domain/SecurityIdentityRetrievalStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Symfony\Component\Security\Core\Authentication\Token\NullToken;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter;
use Symfony\Component\Security\Core\Authorization\Voter\CacheableVoterInterface;
use Symfony\Component\Security\Core\Role\RoleHierarchyInterface;

/**
Expand Down Expand Up @@ -78,7 +79,7 @@ public function getSecurityIdentities(TokenInterface $token)

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

Expand Down

0 comments on commit a0ceb91

Please sign in to comment.