Skip to content

[FrameworkBundle][SecurityBundle] Moved security expression providers pass logic to SecurityBundle #27611

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 19, 2018

Conversation

HeahDude
Copy link
Contributor

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets ~
License MIT
Doc PR ~

@nicolas-grekas nicolas-grekas changed the title Moved security expression provider pass to SecurityBundle [FrameworkBundle] Moved security expression provider pass to SecurityBundle Jun 15, 2018
@stof
Copy link
Member

stof commented Jun 15, 2018

We probably need to make SecurityBundle conflict with older versions of FrameworkBundle to ensure we don't end up with double registration

*/
public function process(ContainerBuilder $container)
{
if ($container->has('security.expression_language')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a guard clause now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the code remains cleans and small with one indent, I would keep a readable true condition here. I'll wait for other opinions before changing the style.

@HeahDude
Copy link
Contributor Author

@stof I added a BC layer in 50a09da. Thanks for the review.

@HeahDude HeahDude force-pushed the security-expression-pass branch from 50a09da to 0869588 Compare June 16, 2018 10:15
@HeahDude HeahDude changed the title [FrameworkBundle] Moved security expression provider pass to SecurityBundle [FrameworkBundle][SecurityBundle] Moved security expression providers pass logic to SecurityBundle Jun 16, 2018
@HeahDude HeahDude force-pushed the security-expression-pass branch 3 times, most recently from 00631cf to 70f6708 Compare June 16, 2018 11:20
@HeahDude
Copy link
Contributor Author

Failures unrelated.

Status: needs review

@nicolas-grekas nicolas-grekas added this to the next milestone Jun 17, 2018
@@ -46,7 +46,7 @@
"conflict": {
"symfony/var-dumper": "<3.4",
"symfony/event-dispatcher": "<3.4",
"symfony/framework-bundle": "<4.1.1",
"symfony/framework-bundle": "<4.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L33 should bump to 4.2 also

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

public function __construct(bool $handleSecurityLanguageProviders = true)
{
if ($handleSecurityLanguageProviders) {
@trigger_error(sprintf('Registering services tagged with "security.expression_language_provider" with "%s" is deprecated since Symfony 4.2, use the "%s" instead.', __CLASS__, SecurityExpressionLanguageProvidersPass::class), E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest removing the first "with".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, done.

@@ -6,6 +6,7 @@ CHANGELOG

* Allowed configuring taggable cache pools via a new `framework.cache.pools.tags` option (bool|service-id)
* Deprecated auto-injection of the container in AbstractController instances, register them as service subscribers instead
* Deprecated the processing of services tagged `security.expression_language_provider` in favor of the new SecurityBundle pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated processing of services tagged security.expression_language_provider in favor of a new AddExpressionLanguageProvidersPass in SecurityBundle.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@HeahDude HeahDude force-pushed the security-expression-pass branch from 70f6708 to a8017be Compare June 19, 2018 13:02
@nicolas-grekas
Copy link
Member

Thank you @HeahDude.

@nicolas-grekas nicolas-grekas merged commit a8017be into symfony:master Jun 19, 2018
nicolas-grekas added a commit that referenced this pull request Jun 19, 2018
…ssion providers pass logic to SecurityBundle (HeahDude)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle][SecurityBundle] Moved security expression providers pass logic to SecurityBundle

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

Commits
-------

a8017be [FrameworkBundle][SecurityBundle] Moved security expression providers pass logic to SecurityBundle
@HeahDude HeahDude deleted the security-expression-pass branch June 19, 2018 13:08
nicolas-grekas added a commit that referenced this pull request Jun 19, 2018
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Fixed tests added in #27611

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

be97006 [FrameworkBundle] Fixed tests added in #27611
@nicolas-grekas nicolas-grekas removed this from the next milestone Nov 1, 2018
@nicolas-grekas nicolas-grekas added this to the 4.2 milestone Nov 1, 2018
This was referenced Nov 3, 2018
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.

5 participants