Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Security] Add an easier way to get the current firewall configuration#46066
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
What's the best way to make the low-deps check passing? |
wouterj commentedApr 16, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
By requiring However, this does signal the design flaw of the current implementation (which is a flaw with the Please note that this is purely a -1 for the implementation, I think the DX problem highlighted in the issue is worth fixing. @chalasr this is the second time we have a nice DX improvement that introduces lots of coupling through the |
Kocal commentedApr 16, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Having the |
Big 👍 for moving the helper to SecurityBundle. |
…to SecurityBundle (chalasr)This PR was merged into the 6.2 branch.Discussion----------[Security][SecurityBundle] Move the `Security` helper to SecurityBundle| Q | A| ------------- | ---| Branch? | 6.2| Bug fix? | no| New feature? | yes| Deprecations? | yes| Tickets |Fixessymfony/symfony#46066 (comment)| License | MIT| Doc PR | todoThe `Security` helper is a high-level service providing an easy access to commonly-needed features coming from various low-level abstractions. Basically, it's a facade.Based on this, it makes sense to me to make it available only via the full-stack framework, as proposed by Wouter insymfony/symfony#46066 (comment).This unlocks #46066,symfony/symfony#41274 andsymfony/symfony#41406./cc@wouterj@johnkrovitch@KocalCommits-------7b91bcb068 [Security] Move the `Security` helper to SecurityBundle
Kocal commentedJun 5, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 like it, thanks@Kocal!
Uh oh!
There was an error while loading.Please reload this page.
Thank you@Kocal. |
@Kocal Nice work. Thx for implementing this 👍 |
$container = $this->createContainer('security.firewall.map', $firewallMap); | ||
$security = new \Symfony\Component\Security\Core\Security($container); |
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.
Bad rebase :) See#46619
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.
Thx!
…to SecurityBundle (chalasr)This PR was merged into the 6.2 branch.Discussion----------[Security][SecurityBundle] Move the `Security` helper to SecurityBundle| Q | A| ------------- | ---| Branch? | 6.2| Bug fix? | no| New feature? | yes| Deprecations? | yes| Tickets |Fixessymfony/symfony#46066 (comment)| License | MIT| Doc PR | todoThe `Security` helper is a high-level service providing an easy access to commonly-needed features coming from various low-level abstractions. Basically, it's a facade.Based on this, it makes sense to me to make it available only via the full-stack framework, as proposed by Wouter insymfony/symfony#46066 (comment).This unlocks #46066,symfony/symfony#41274 andsymfony/symfony#41406./cc@wouterj@johnkrovitch@KocalCommits-------7b91bcb068 [Security] Move the `Security` helper to SecurityBundle
Uh oh!
There was an error while loading.Please reload this page.
Added a new method
Security#getFirewallConfig($request)
to easily get the firewall configuration associated to theRequest
.The firewall name can be accessed through
$security->getFirewallConfig($request)?->getName()
.