symfony / security-acl

Symfony Security ACL Component
https://symfony.com/components/Security
MIT License
363 stars 48 forks source link

declaration incompatibility error in SF7 #114

Open hgabka opened 5 months ago

hgabka commented 5 months ago

In the Symfony 7 security bundle the VoterInterface::vote method signature has changed and this causes the following incompatibility error in AclVoter class:

Declaration of Symfony\Component\Security\Acl\Voter\AclVoter::vote(Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, $subject, array $attributes) must be compatible with Symfony\Component\Security\Core\Authorization\Voter\VoterInterface::vote(Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, mixed $subject, array $attributes): int in /var/www/html/vendor/symfony/security-acl/Voter/AclVoter.php on line 54

The signature should be changed in AclVoter, too: public function vote(TokenInterface $token, mixed $subject, array $attributes): int

hgabka commented 5 months ago

Created a PR with the fix: https://github.com/symfony/security-acl/pull/115