Skip to content

[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
merged 1 commit into from
Jun 5, 2022

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Apr 17, 2022

Q A
Branch? 6.2
Bug fix? no
New feature? yes
Deprecations? yes
Tickets Fixes #46066 (comment)
License MIT
Doc PR todo

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

@chalasr chalasr requested a review from wouterj as a code owner April 17, 2022 22:38
@carsonbot carsonbot added this to the 6.1 milestone Apr 17, 2022
@chalasr chalasr modified the milestones: 6.1, 6.2 Apr 17, 2022
@chalasr chalasr force-pushed the mv-sec-helper branch 3 times, most recently from 47827d2 to 741cf2a Compare April 17, 2022 23:23
@Kocal
Copy link
Member

Kocal commented Apr 18, 2022

Thanks @chalasr! 😍

@chalasr chalasr force-pushed the mv-sec-helper branch 2 times, most recently from 116495a to 8060907 Compare May 30, 2022 18:38
@chalasr chalasr added the Ready label May 30, 2022
@chalasr
Copy link
Member Author

chalasr commented May 30, 2022

Rebased on 6.2

@carsonbot carsonbot changed the title [Security] Move the Security helper to SecurityBundle [Security][SecurityBundle] Move the Security helper to SecurityBundle May 30, 2022
Copy link
Member

@wouterj wouterj left a 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!

@chalasr chalasr force-pushed the mv-sec-helper branch 4 times, most recently from 0ed5d7a to 0c0f95f Compare May 31, 2022 20:15
Copy link
Member

@wouterj wouterj left a 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
Copy link
Member

fabpot commented Jun 5, 2022

Thank you @chalasr.

@fabpot fabpot merged commit 0140746 into symfony:6.2 Jun 5, 2022
@chalasr chalasr deleted the mv-sec-helper branch June 5, 2022 21:09
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:
![image](https://user-images.githubusercontent.com/2445045/172196153-dbcacf0e-0632-40ad-87a2-bbe7774cc698.png)

Commits
-------

0b81a75 [SecurityBundle] Add service alias for legacy Security helper
@fabpot fabpot mentioned this pull request Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants