Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Open
Labels
Description
Description
While looking at theVoterInterface::vote
function, it was rather hard to figure out why$attributes
is anarray
(and what is it expected to contain):
symfony/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php
Line 38 inde93ccd
publicfunctionvote(TokenInterface$token,mixed$subject,array$attributes):int; |
It looks like this should be removed since Symfony 6.0:
symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php
Line 54 inde93ccd
// Special case for AccessListener, do not remove the right side of the condition before 6.0 |
I could not find any issue about this in the backlog.
I think it is also the time to update$attributes
to astring
, but that is a breaking change. This may not be possible, see#54060 (comment).
Example
interface VoterInterface{publicfunctionvote(TokenInterface$token,mixed$subject,string$attribute):int;}