Skip to content

[SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer #23523

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
Jul 17, 2017
Merged

[SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer #23523

merged 1 commit into from
Jul 17, 2017

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Jul 15, 2017

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

@ogizanagi in 4.0 it will simply extend Command right.. wdyt?

Also we dont deprecate setContainer is that intentional?

@ogizanagi
Copy link
Contributor

The deprecation path and wording here was not as obvious as usual to me, so it might need clarifications indeed. To answer your questions:

  • in 4.0 it will simply extend Command right.. wdyt?

    Yes. But what it extends is not the point. The removed public API is. You shouldn't rely anymore on the fact the container is injected in the command because it implements CommandAwareInterface, that's the point.
    That's why I chose to mention the interface over the ContainerAwareCommand class in the deprecation message... but getContainer() is not part of the interface so it may look a bit weird...
    The related CHANGELOG entry I added about this is:

    Deprecated UserPasswordEncoderCommand::getContainer() and relying on the ContainerAwareInterface interface for this command.

    which tries to indicate both the UserPasswordEncoderCommand::getContainer() method AND relying on the ContainerAwareInterface is deprecated. That's two deprecations at once actually.

  • Also we dont deprecate setContainer is that intentional?

    It was intentional, to not trigger the same deprecation twice and mostly because setContainer() will still be called by the Application until the ContainerAwareInterface is removed.

Anyway, I'm 👍 for your changes if it clarifies anything to you.

@ro0NL
Copy link
Contributor Author

ro0NL commented Jul 15, 2017

Well.. if we can skip the hassle of deprecating both set/get individually this way, that's fine i guess 👍

I just thought it should mention ContainerAwareCommand because it implies ContainerAwareInterface and thus mentions both.

edit: updated to explicitly mention both :)

@nicolas-grekas nicolas-grekas added this to the 3.3 milestone Jul 17, 2017
@fabpot
Copy link
Member

fabpot commented Jul 17, 2017

Thank you @ro0NL.

@fabpot fabpot merged commit 7ea2d04 into symfony:3.3 Jul 17, 2017
fabpot added a commit that referenced this pull request Jul 17, 2017
…derCommand::getContainer (ro0NL)

This PR was merged into the 3.3 branch.

Discussion
----------

[SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

@ogizanagi in 4.0 it will simply extend `Command` right.. wdyt?

Also we dont deprecate `setContainer` is that intentional?

Commits
-------

7ea2d04 [SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer
@ro0NL ro0NL deleted the security/commands branch July 17, 2017 10:13
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.

6 participants