From 45742f1a97291edd1401ecb58024488bbd793038 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sat, 27 Oct 2018 21:37:34 +0200 Subject: [PATCH] Fix deprecation on symfony/config 4.2 --- DependencyInjection/Configuration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 152c2ec1..c03828a6 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -305,8 +305,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('monolog'); + $treeBuilder = new TreeBuilder('monolog'); + $rootNode = method_exists(TreeBuilder::class, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('monolog'); $rootNode ->fixXmlConfig('channel')