Fixtures ????? PasswordHasherInterface? ?? ????? ???.
?????? ??? ??????:
DefinitionErrorExceptionPass.php ?? 54: ! !
!!'AppDataFixturesUserFixture' ???? ?? ??? ? ????: ???? '$hasher'
!!??? "__construct()"? "SymfonyComponentPasswordH
?????? ?????. !!asherPasswordHasherInterface" ??? ??? ???? ???? ????. ???? ?????
!!? ?????? ???? ???? ??????
! !
? ?? services.yaml:
???Symfony 6.1?? ?? ????? ???? ??? ?????? ? ??? ???? ??? ??????
?? ??? ? ?? ?? ???? PasswordHasher
.
??:
SymfonyComponentPasswordHasherHasherPasswordHasherFactoryInterface
SymfonyComponentPasswordHasherHasherUserPasswordHasherInterface
???*?). ???? ???? ??? ??? ????. (????? ??)
????? ??? ??? ??? ????.
composer require symfony/password-hasher
UserPasswordHasherInterface
?? PasswordHasherFactoryInterface
??(? ?? PasswordHasherFactoryInterface
(請(qǐng)參閱示例)并獲取PasswordHasher
) ???
UserPasswordHasherInterface
*: ?? ??? ?? ??