@@ -972,7 +972,7 @@ the LazyValue can be `memoized <https://en.wikipedia.org/wiki/Memoization>`_ so
972
972
return [
973
973
// Call CategoryFactory::random() everytime this factory is instantiated
974
974
'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
976
976
'project' => ProjectFactory::new(['users' => [$owner]]),
977
977
'owner' => $owner,
978
978
];
@@ -1006,7 +1006,7 @@ common use-case: encoding a password with the ``UserPasswordHasherInterface`` se
1006
1006
1007
1007
public static function class(): string
1008
1008
{
1009
- return UserForPersistentFactory ::class;
1009
+ return User ::class;
1010
1010
}
1011
1011
1012
1012
protected function defaults(): array
@@ -1020,7 +1020,7 @@ common use-case: encoding a password with the ``UserPasswordHasherInterface`` se
1020
1020
protected function initialize(): static
1021
1021
{
1022
1022
return $this
1023
- ->afterInstantiate(function(UserForPersistentFactory $user) {
1023
+ ->afterInstantiate(function(User $user) {
1024
1024
if ($this->passwordHasher !== null) {
1025
1025
$user->setPassword($this->passwordHasher->hashPassword($user, $user->getPassword()));
1026
1026
}
@@ -2035,7 +2035,7 @@ You can improve the speed by reducing the *work factor* of your encoder:
2035
2035
# config/packages/test/security.yaml
2036
2036
encoders :
2037
2037
# use your user class name here
2038
- App\Entity\UserForPersistentFactory :
2038
+ App\Entity\User :
2039
2039
# This should be the same value as in config/packages/security.yaml
2040
2040
algorithm : auto
2041
2041
cost : 4 # Lowest possible value for bcrypt
0 commit comments