diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 76a18f3..338e31d 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -15,8 +15,13 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('limenius_react'); + $treeBuilder = new TreeBuilder('limenius_react'); + if (method_exists($treeBuilder, 'getRootNode')) { + $rootNode = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $rootNode = $treeBuilder->root('limenius_react'); + } $rootNode ->children() ->enumNode('default_rendering')