-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security][SecurityBundle] Move the Security
helper to SecurityBundle
#46094
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47827d2
to
741cf2a
Compare
Thanks @chalasr! 😍 |
116495a
to
8060907
Compare
Rebased on 6.2 |
Security
helper to SecurityBundleSecurity
helper to SecurityBundle
stof
reviewed
May 31, 2022
wouterj
reviewed
May 31, 2022
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.
Thank you for working on this!
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/SecurityContextAttributes.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/Authenticator/JsonLoginAuthenticator.php
Outdated
Show resolved
Hide resolved
0ed5d7a
to
0c0f95f
Compare
wouterj
approved these changes
Jun 4, 2022
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.
Looking good to me!
fabpot
approved these changes
Jun 5, 2022
Thank you @chalasr. |
chalasr
added a commit
that referenced
this pull request
Jun 6, 2022
…elper (HypeMC) This PR was merged into the 6.2 branch. Discussion ---------- [SecurityBundle] Add service alias for legacy Security helper | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - The service alias for `Symfony\Component\Security\Core\Security` was removed in #46094 which causes existing code to break when upgrading to 6.2, eg: ```php use Symfony\Component\Security\Core\Security; class HomeController extends AbstractController { public function __construct(private Security $security) { } } ``` results in:  Commits ------- 0b81a75 [SecurityBundle] Add service alias for legacy Security helper
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
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 in #46066 (comment).
This unlocks #46066, #41274 and #41406.
/cc @wouterj @johnkrovitch @Kocal