We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3e77ce6 + 7423e3b commit d7ad8d2Copy full SHA for d7ad8d2
DependencyInjection/Configuration.php
@@ -19,8 +19,15 @@ class Configuration implements ConfigurationInterface
19
{
20
public function getConfigTreeBuilder()
21
22
- $builder = new TreeBuilder();
23
- $builder->root('bobv_entity_history')
+ $treeBuilder = new TreeBuilder('bobv_entity_history');
+
24
+ if (method_exists($treeBuilder, 'getRootNode')) {
25
+ $rootNode = $treeBuilder->getRootNode();
26
+ } else {
27
+ // for symfony/config 4.1 and older
28
+ $rootNode = $treeBuilder->root('bobv_entity_history');
29
+ }
30
+ $rootNode
31
->children()
32
->arrayNode('entities')
33
->prototype('scalar')->end()
@@ -53,6 +60,6 @@ public function getConfigTreeBuilder()
53
60
->end()
54
61
->end();
55
62
56
- return $builder;
63
+ return $treeBuilder;
57
64
}
58
65
0 commit comments