Skip to content

Commit

Permalink
Merge pull request #16 from SimLibaud/tree-builder
Browse files Browse the repository at this point in the history
Root name to TreeBuilder constructor
  • Loading branch information
SimLibaud committed Sep 5, 2019
2 parents 3e4f256 + d8d969b commit cf34acc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$tree = new TreeBuilder();
$root = $tree->root('sil_route_security');
$tree = new TreeBuilder('sil_route_security');
// Keep compatibility with symfony/config < 4.2
if (false === method_exists($tree, 'getRootNode')) {
$root = $tree->root('sil_route_security');
} else {
$root = $tree->getRootNode();
}

$root
->children()
Expand Down

0 comments on commit cf34acc

Please sign in to comment.