minor #35628 [Security] Improve info UserPasswordEncoderCommand (wimme002)

This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #35628).

Discussion
----------

[Security] Improve info UserPasswordEncoderCommand

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT
| Doc PR        | n/a

`php bin/console security:encode-password [password] App\Entity\User`
will result in
`No encoder has been configured for account "AppEntityUser".  `

If a full class path is used, it either has to be passed in as a string or has to be escaped by double slashes.

Commits
-------

3604bb7018 Update UserPasswordEncoderCommand.php
This commit is contained in:
Fabien Potencier 2020-02-07 08:50:00 +01:00
commit 36ffca37e3

View File

@ -87,16 +87,16 @@ generated to encode the password:
Pass the full user class path as the second argument to encode passwords for
your own entities:
<info>php %command.full_name% --no-interaction [password] App\Entity\User</info>
<info>php %command.full_name% --no-interaction [password] 'App\Entity\User'</info>
Executing the command interactively allows you to generate a random salt for
encoding the password:
<info>php %command.full_name% [password] App\Entity\User</info>
<info>php %command.full_name% [password] 'App\Entity\User'</info>
In case your encoder doesn't require a salt, add the <comment>empty-salt</comment> option:
<info>php %command.full_name% --empty-salt [password] App\Entity\User</info>
<info>php %command.full_name% --empty-salt [password] 'App\Entity\User'</info>
EOF
)