-
Notifications
You must be signed in to change notification settings - Fork 111
[Symfony 7.3] Replace AuthorizationChecker with AccessDecisionManager… #913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Symfony 7.3] Replace AuthorizationChecker with AccessDecisionManager… #913
Conversation
rules/Symfony73/Rector/Class_/AuthorizationCheckerToAccessDecisionManagerInVoterRector.php
Outdated
Show resolved
Hide resolved
rules/Symfony73/Rector/Class_/AuthorizationCheckerToAccessDecisionManagerInVoterRector.php
Outdated
Show resolved
Hide resolved
rules/Symfony73/Rector/Class_/AuthorizationCheckerToAccessDecisionManagerInVoterRector.php
Outdated
Show resolved
Hide resolved
e64d0b2 to
3c3f369
Compare
rules/Symfony73/Rector/Class_/AuthorizationCheckerToAccessDecisionManagerInVoterRector.php
Show resolved
Hide resolved
3c3f369 to
5ffc574
Compare
rules/Symfony73/Rector/Class_/AuthorizationCheckerToAccessDecisionManagerInVoterRector.php
Show resolved
Hide resolved
5ffc574 to
53f0017
Compare
samsonasik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
53f0017 to
d73085b
Compare
cdb9687 to
0e419fc
Compare
0e419fc to
7f5d38c
Compare
|
Thank you 👍 |
|
I'm using AuthorisationCheckerInterface in a voter and AuthorizationCheckerToAccessDecisionManagerInVoterRector is completely stripping out the injection of this service. We then have code failing as $this->authorizationChecker is no longer available. @TomasVotruba, looks like the actual upgrade is working to replace the variable and use the new signature with $token as the first parameter? |

Adds a Symfony 7.3 Rector rule that replaces
AuthorizationCheckerInterfacewith
AccessDecisionManagerInterfacein voters.The rule updates injected services, renames properties, and converts
isGranted()calls todecide().Tests and fixtures are included.