Skip to content

Commit

Permalink
Merge pull request #24 from ivan-jovanovic/patch-1
Browse files Browse the repository at this point in the history
Symfony 5.0 Update
  • Loading branch information
makasim authored Nov 27, 2019
2 parents 06afb31 + ce52289 commit fbdc605
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$tb = new TreeBuilder();
$rootNode = $tb->root('enqueue_elastica');

$tb = new TreeBuilder('enqueue_elastica');
if (method_exists($tb, 'getRootNode')) {
$rootNode = $tb->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $tb->root('enqueue_elastica');
}
$rootNode
->children()
->booleanNode('enabled')->defaultValue(true)->end()
Expand Down

0 comments on commit fbdc605

Please sign in to comment.