-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[5.0][Security] Minor clarification of the new isGranted signature #34074
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
[5.0][Security] Minor clarification of the new isGranted signature #34074
Conversation
src/Symfony/Component/Security/Core/Authorization/AuthorizationCheckerInterface.php
Outdated
Show resolved
Hide resolved
That's for 4.4. |
@nicolas-grekas the problem with the That's kind of broken but I'm not sure how we could create a migrations path to completely remove the usage of arrays in the authorization process (the voter interface has the same problem). |
src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php
Outdated
Show resolved
Hide resolved
3e7a36f
to
991c0a4
Compare
Also, allow the array type for a single attribute.
991c0a4
to
e41e6b4
Compare
PR updated:
@nicolas-grekas I'm not so sure what you meant with this comment. I would say in 4.4, we still allow multiple attributes (but deprecated it), so we shouldn't have these changes there. As for the deprecation, I would prefer to keep it. Otherwise, it's impossible to provide a smooth upgrade path here. |
Build failure seems unrelated btw |
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.
I'm a bit sad that decide() still accepts a list of attibutes, thus the array wrapper
but we might continue working on this in 5.x I suppose.
Thank you @wouterj. |
… signature (wouterj) This PR was merged into the 5.0-dev branch. Discussion ---------- [5.0][Security] Minor clarification of the new isGranted signature | Q | A | ------------- | --- | Branch? | 5.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a As we now only allow a single attribute for `isGranted()` in Symfony 5, let's adapt the PHPdoc and parameter name as well. Commits ------- e41e6b4 Clarified single attribute to isGranted() a bit more
…from #34074 (Dennis Langen) This PR was submitted for the master branch but it was squashed and merged into the 5.1 branch instead. Discussion ---------- fix: clarify parameter name to comply with deprecations from #34074 | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #37824 | License | MIT | Doc PR | [FrameworkBundle] Clarify parameter name from `$attributes` to `$attribute` in `AbstractController:denyUnlessGranted` Commits ------- 91249ed fix: clarify parameter name to comply with deprecations from #34074
* 5.1: fix: clarify parameter name to comply with deprecations from #34074 [Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport mark the AssertingContextualValidator class as internal Fix the parameter names in the SecurityFactoryInterface::create() method [Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when a discriminator child extends another one make return type correct
* 5.1: fix: clarify parameter name to comply with deprecations from symfony#34074 [Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport mark the AssertingContextualValidator class as internal Fix the parameter names in the SecurityFactoryInterface::create() method [Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when a discriminator child extends another one make return type correct
As we now only allow a single attribute for
isGranted()
in Symfony 5, let's adapt the PHPdoc and parameter name as well.