Skip to content

Commit

Permalink
Favor TreeBuilder::getRootNode
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
chrisguitarguy committed Apr 29, 2021
1 parent 1b040b3 commit 2d75b9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d75b9c

Please sign in to comment.