Skip to content

Commit 2ca0a15

Browse files
committed
1 parent 43747c5 commit 2ca0a15

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

Command/UserPasswordHashCommand.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -53,42 +53,42 @@ protected function configure(): void
5353
->addOption('empty-salt', null, InputOption::VALUE_NONE, 'Do not generate a salt or let the hasher generate one.')
5454
->setHelp(<<<EOF
5555
56-
The <info>%command.name%</info> command hashes passwords according to your
57-
security configuration. This command is mainly used to generate passwords for
58-
the <comment>in_memory</comment> user provider type and for changing passwords
59-
in the database while developing the application.
56+
The <info>%command.name%</info> command hashes passwords according to your
57+
security configuration. This command is mainly used to generate passwords for
58+
the <comment>in_memory</comment> user provider type and for changing passwords
59+
in the database while developing the application.
6060
61-
Suppose that you have the following security configuration in your application:
61+
Suppose that you have the following security configuration in your application:
6262
63-
<comment>
64-
# config/packages/security.yml
65-
security:
66-
password_hashers:
67-
Symfony\Component\Security\Core\User\InMemoryUser: plaintext
68-
App\Entity\User: auto
69-
</comment>
63+
<comment>
64+
# config/packages/security.yml
65+
security:
66+
password_hashers:
67+
Symfony\Component\Security\Core\User\InMemoryUser: plaintext
68+
App\Entity\User: auto
69+
</comment>
7070
71-
If you execute the command non-interactively, the first available configured
72-
user class under the <comment>security.password_hashers</comment> key is used and a random salt is
73-
generated to hash the password:
71+
If you execute the command non-interactively, the first available configured
72+
user class under the <comment>security.password_hashers</comment> key is used and a random salt is
73+
generated to hash the password:
7474
75-
<info>php %command.full_name% --no-interaction [password]</info>
75+
<info>php %command.full_name% --no-interaction [password]</info>
7676
77-
Pass the full user class path as the second argument to hash passwords for
78-
your own entities:
77+
Pass the full user class path as the second argument to hash passwords for
78+
your own entities:
7979
80-
<info>php %command.full_name% --no-interaction [password] 'App\Entity\User'</info>
80+
<info>php %command.full_name% --no-interaction [password] 'App\Entity\User'</info>
8181
82-
Executing the command interactively allows you to generate a random salt for
83-
hashing the password:
82+
Executing the command interactively allows you to generate a random salt for
83+
hashing the password:
8484
85-
<info>php %command.full_name% [password] 'App\Entity\User'</info>
85+
<info>php %command.full_name% [password] 'App\Entity\User'</info>
8686
87-
In case your hasher doesn't require a salt, add the <comment>empty-salt</comment> option:
87+
In case your hasher doesn't require a salt, add the <comment>empty-salt</comment> option:
8888
89-
<info>php %command.full_name% --empty-salt [password] 'App\Entity\User'</info>
89+
<info>php %command.full_name% --empty-salt [password] 'App\Entity\User'</info>
9090
91-
EOF
91+
EOF
9292
)
9393
;
9494
}

Tests/Command/UserPasswordHashCommandTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,12 @@ public function testEncodePasswordAsksNonProvidedUserClass()
258258
], ['decorated' => false]);
259259

260260
$this->assertStringContainsString(<<<EOTXT
261-
For which user class would you like to hash a password? [Custom\Class\Native\User]:
262-
[0] Custom\Class\Native\User
263-
[1] Custom\Class\Pbkdf2\User
264-
[2] Custom\Class\Test\User
265-
[3] Symfony\Component\Security\Core\User\InMemoryUser
266-
EOTXT
261+
For which user class would you like to hash a password? [Custom\Class\Native\User]:
262+
[0] Custom\Class\Native\User
263+
[1] Custom\Class\Pbkdf2\User
264+
[2] Custom\Class\Test\User
265+
[3] Symfony\Component\Security\Core\User\InMemoryUser
266+
EOTXT
267267
, $this->passwordHasherCommandTester->getDisplay(true));
268268
}
269269

0 commit comments

Comments
 (0)