1313namespace PHPMentors \CompositePasswordAuthenticationBundle \DependencyInjection \Security \Factory ;
1414
1515use Symfony \Bundle \SecurityBundle \DependencyInjection \Security \Factory \FormLoginFactory ;
16+ use Symfony \Component \DependencyInjection \ChildDefinition ;
1617use Symfony \Component \DependencyInjection \ContainerBuilder ;
1718use Symfony \Component \DependencyInjection \DefinitionDecorator ;
1819use Symfony \Component \DependencyInjection \Reference ;
@@ -22,19 +23,19 @@ class FormLoginCompositePasswordFactory extends FormLoginFactory
2223 /**
2324 * {@inheritdoc}
2425 */
25- public function getKey ()
26+ public function getKey (): string
2627 {
2728 return 'form-login-composite-password ' ;
2829 }
2930
3031 /**
3132 * {@inheritdoc}
3233 */
33- protected function createAuthProvider (ContainerBuilder $ container , $ id , $ config , $ userProviderId )
34+ protected function createAuthProvider (ContainerBuilder $ container , string $ id , array $ config , string $ userProviderId ): string
3435 {
3536 $ provider = 'phpmentors_composite_password_authentication.composite_password_dao_authentication_provider. ' .$ id ;
3637 $ container
37- ->setDefinition ($ provider , new DefinitionDecorator ('phpmentors_composite_password_authentication.composite_password_dao_authentication_provider ' ))
38+ ->setDefinition ($ provider , new ChildDefinition ('phpmentors_composite_password_authentication.composite_password_dao_authentication_provider ' ))
3839 ->replaceArgument (0 , new Reference ($ userProviderId ))
3940 ->replaceArgument (1 , new Reference ('security.user_checker. ' .$ id ))
4041 ->replaceArgument (2 , $ id )
0 commit comments