diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 3630e7ba..6e0671f5 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -26,8 +26,15 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder(): TreeBuilder { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('liip_functional_test', 'array'); + if (method_exists(TreeBuilder::class, 'getRootNode')) { + $treeBuilder = new TreeBuilder('liip_functional_test'); + $rootNode = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('liip_functional_test', 'array'); + } + $rootNode ->children() ->arrayNode('cache_db')