3
3
namespace FR3D \LdapBundle \Security \Factory ;
4
4
5
5
use Symfony \Bundle \SecurityBundle \DependencyInjection \Security \Factory \SecurityFactoryInterface ;
6
+ use Symfony \Component \DependencyInjection \ChildDefinition ;
6
7
use Symfony \Component \Config \Definition \Builder \NodeDefinition ;
7
8
use Symfony \Component \DependencyInjection \ContainerBuilder ;
8
- use Symfony \Component \DependencyInjection \DefinitionDecorator ;
9
9
use Symfony \Component \DependencyInjection \Reference ;
10
10
11
11
class HttpBasicLdapFactory implements SecurityFactoryInterface
@@ -50,7 +50,7 @@ protected function createAuthProvider(ContainerBuilder $container, $id, $userPro
50
50
$ providerId = $ provider .'. ' .$ id ;
51
51
52
52
$ container
53
- ->setDefinition ($ providerId , new DefinitionDecorator ($ provider ))
53
+ ->setDefinition ($ providerId , new ChildDefinition ($ provider ))
54
54
->replaceArgument (1 , $ id ) // Provider Key
55
55
->replaceArgument (2 , new Reference ($ userProviderId )) // User Provider
56
56
;
@@ -62,7 +62,7 @@ protected function createListener(ContainerBuilder $container, $id, $entryPointI
62
62
{
63
63
// listener
64
64
$ listenerId = 'security.authentication.listener.basic. ' .$ id ;
65
- $ listener = $ container ->setDefinition ($ listenerId , new DefinitionDecorator ('security.authentication.listener.basic ' ));
65
+ $ listener = $ container ->setDefinition ($ listenerId , new ChildDefinition ('security.authentication.listener.basic ' ));
66
66
$ listener ->replaceArgument (2 , $ id );
67
67
$ listener ->replaceArgument (3 , new Reference ($ entryPointId ));
68
68
@@ -77,7 +77,7 @@ protected function createEntryPoint(ContainerBuilder $container, $id, $config, $
77
77
78
78
$ entryPointId = 'security.authentication.basic_entry_point. ' .$ id ;
79
79
$ container
80
- ->setDefinition ($ entryPointId , new DefinitionDecorator ('security.authentication.basic_entry_point ' ))
80
+ ->setDefinition ($ entryPointId , new ChildDefinition ('security.authentication.basic_entry_point ' ))
81
81
->addArgument ($ config ['realm ' ])
82
82
;
83
83
0 commit comments