diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index ac2f600..84d5233 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -14,8 +14,14 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('qp_woohoolabs_yin'); + $treeBuilder = new TreeBuilder('qp_woohoolabs_yin'); + + if (\method_exists($treeBuilder, 'getRootNode')) { + $rootNode = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $rootNode = $treeBuilder->root('qp_woohoolabs_yin'); + } $rootNode ->children()