From 1d66d148314fbc01e2b1d53c1020f3a5dff5c6a2 Mon Sep 17 00:00:00 2001 From: David Ward Date: Thu, 27 Dec 2018 12:32:52 -0800 Subject: [PATCH] fix root node deprecation in symfony-config > 4.1 --- DependencyInjection/Configuration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()