rector-symfony
rector-symfony copied to clipboard
[Symfony 4.4] Updating AuthorizationCheckerIsGrantedExtractorRector
Felt like this rule was missing the AbstractController implementation.
This PR will add AbstractController::isGranted()
and AbstractController::denyAccessUnlessGranted()
support
Looks good, ready to merge?
Hold your horses 😬 I need to work on the denyUnlessGranted()
implementation
I'm looking for the right return type to get from a MethodCall
$this->denyAccessUnlessGranted(['ROLE_USER', 'ROLE_ADMIN']);
To
$this->denyAccessUnlessGranted('ROLE_USER');
$this->denyAccessUnlessGranted('ROLE_ADMIN');
Using the current processExtractIsGranted
, the result is
$this->denyAccessUnlessGranted('ROLE_USER') || $this->denyAccessUnlessGranted('ROLE_ADMIN');
So I was thinking on replacing the BooleanOr
for something else, but am kind of lost 😨