File tree 1 file changed +6
-1
lines changed
DependencyInjection/Compiler
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 17
17
use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
18
18
use Symfony \Component \DependencyInjection \ContainerBuilder ;
19
19
use Symfony \Component \DependencyInjection \Definition ;
20
+ use Symfony \Component \DependencyInjection \DefinitionDecorator ;
20
21
use Symfony \Component \DependencyInjection \Reference ;
21
22
22
23
/**
@@ -49,7 +50,11 @@ public function process(ContainerBuilder $container)
49
50
);
50
51
}
51
52
52
- $ definition = new ChildDefinition ($ filters [($ filterOptions ['type ' ])]);
53
+ if (class_exists ('Symfony\Component\DependencyInjection\ChildDefinition ' )) {
54
+ $ definition = new ChildDefinition ($ filters [($ filterOptions ['type ' ])]);
55
+ } else {
56
+ $ definition = new DefinitionDecorator ($ filters [($ filterOptions ['type ' ])]);
57
+ }
53
58
$ definition ->addMethodCall ('setRequestField ' , [$ filterOptions ['request_field ' ]]);
54
59
$ definition ->addMethodCall ('setDocumentField ' , [$ filterOptions ['document_field ' ]]);
55
60
$ definition ->addMethodCall ('setTags ' , [$ filterOptions ['tags ' ]]);
You can’t perform that action at this time.
0 commit comments