Skip to content

Commit

Permalink
Fix Symfony 4.3 deprecation (isometriks#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaszGasior authored and isometriks committed Nov 19, 2019
1 parent 8a52923 commit 9bc86cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('isometriks_spam');
$rootNode = $treeBuilder->root('isometriks_spam');
if (\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('isometriks_spam');
}

$rootNode
->children()
Expand Down

0 comments on commit 9bc86cc

Please sign in to comment.