From 2d75b9c026ddeaedb72d8ca3bce6f50f29f8e60b Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Thu, 29 Apr 2021 09:01:57 -0500 Subject: [PATCH] Favor TreeBuilder::getRootNode So the bundle doesn't produce notices about `root` being deprecated. Also changed the call to `root` so it passes `treeType` as it does a few lines up. Seems like calling `root` replaces the root node so the AWS_MERGE_CONFIG thing might have been subtle broken in older symfony versions? --- src/DependencyInjection/Configuration.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index cf4cbce..91fef36 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -31,10 +31,10 @@ public function getConfigTreeBuilder() return $treeBuilder; } - if (method_exists($treeBuilder, 'root')) { - $rootNode = $treeBuilder->root('aws'); - } else { + if (method_exists($treeBuilder, 'getRootNode')) { $rootNode = $treeBuilder->getRootNode(); + } else { + $rootNode = $treeBuilder->root('aws', $treeType); } // Define TreeBuilder to allow config validation and merging