diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index d2fd657..07fea7a 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -17,8 +17,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('tetranz_select2_entity'); + $treeBuilder = new TreeBuilder('tetranz_select2_entity'); + $rootNode = \method_exists($treeBuilder, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('tetranz_select2_entity'); $rootNode ->children()