Skip to content

Commit 21f32b8

Browse files
authored
docs: fix wrong class name (#846)
1 parent 64bc93e commit 21f32b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/index.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ the LazyValue can be `memoized <https://en.wikipedia.org/wiki/Memoization>`_ so
972972
return [
973973
// Call CategoryFactory::random() everytime this factory is instantiated
974974
'category' => LazyValue::new(fn() => CategoryFactory::random()),
975-
// The same UserForPersistentFactory instance will be both added to the Project and set as the Task owner
975+
// The same User instance will be both added to the Project and set as the Task owner
976976
'project' => ProjectFactory::new(['users' => [$owner]]),
977977
'owner' => $owner,
978978
];
@@ -1006,7 +1006,7 @@ common use-case: encoding a password with the ``UserPasswordHasherInterface`` se
10061006

10071007
public static function class(): string
10081008
{
1009-
return UserForPersistentFactory::class;
1009+
return User::class;
10101010
}
10111011

10121012
protected function defaults(): array
@@ -1020,7 +1020,7 @@ common use-case: encoding a password with the ``UserPasswordHasherInterface`` se
10201020
protected function initialize(): static
10211021
{
10221022
return $this
1023-
->afterInstantiate(function(UserForPersistentFactory $user) {
1023+
->afterInstantiate(function(User $user) {
10241024
if ($this->passwordHasher !== null) {
10251025
$user->setPassword($this->passwordHasher->hashPassword($user, $user->getPassword()));
10261026
}
@@ -2035,7 +2035,7 @@ You can improve the speed by reducing the *work factor* of your encoder:
20352035
# config/packages/test/security.yaml
20362036
encoders:
20372037
# use your user class name here
2038-
App\Entity\UserForPersistentFactory:
2038+
App\Entity\User:
20392039
# This should be the same value as in config/packages/security.yaml
20402040
algorithm: auto
20412041
cost: 4 # Lowest possible value for bcrypt

0 commit comments

Comments
 (0)