Skip to content

Commit

Permalink
Merge pull request #10 from addfs/patch-2
Browse files Browse the repository at this point in the history
fix deprecations for symfony >= 4.2
  • Loading branch information
addfs authored Mar 16, 2022
2 parents fcd8b08 + 1df45e9 commit b3f91f3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('intaro_twig_sandbox');

// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
// more information on that topic.
$treeBuilder = new TreeBuilder('intaro_twig_sandbox');
if (\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('intaro_twig_sandbox');
}

return $treeBuilder;
}
Expand Down

0 comments on commit b3f91f3

Please sign in to comment.