-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Deprecation in UserPasswordEncoderCommand::__construct is always throw when you test another command #22855
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
Comments
Could you provide a reproducer? I tried the test in Anyway, it looks very weird to me, as this command is now registered as a service by the |
I will try to provide a reproducer tomorrow. You have to run tests with an empty cache. The UserPasswordEncoderCommand is neither extended or registered in y projet. |
See #22858 |
Thanks @chalasr , same problem I think. |
…EncoderCommand (chalasr) This PR was merged into the 3.3 branch. Discussion ---------- [SecurityBundle] Prevent auto-registration of UserPasswordEncoderCommand | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22855 | License | MIT | Doc PR | n/a Always registers the command as a service even if no encoders are configured so that it is not auto-registered via reflection. Prevents an irrelevant deprecation when no encoders are configured and, if a day the per-convention command registration is removed, ensures that the command always exists (leading to an exception saying that you have no configured encoder, better than nothing). ping @ogizanagi Commits ------- b39b35b Prevent auto-registration of UserPasswordEncoderCommand
When you're using the Symfony way to test command (https://symfony.com/doc/current/console.html#testing-commands), you 'always got a deprecation when the command list is build, because the deprecation is in the __construct(), even if I never used this command in my tests.
Passing null as the first argument of "Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand::__construct" is deprecated since version 3.3 and will be removed in 4.0. If the command was registered by convention, make it a service instead
The text was updated successfully, but these errors were encountered: