Skip to content

Commit

Permalink
Merge pull request #8 from lucassabreu/fix-keep-symfony3-support
Browse files Browse the repository at this point in the history
(fix): keep support to symfony 3 configuration
  • Loading branch information
lucassabreu authored Dec 5, 2020
2 parents b6dcdf3 + e71dd9e commit e60f7d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@

# Embedded web-server pid file
/.web-server-pid
Tests/cache/
7 changes: 5 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('simonetti_ping');
$rootNode = $treeBuilder->getRootNode();
$name = 'simonetti_ping';
$treeBuilder = new TreeBuilder($name);
$rootNode = \method_exists(TreeBuilder::class, 'getRootNode')
? $treeBuilder->getRootNode()
: $treeBuilder->root($name);
$rootNode
->children()
->scalarNode('lock_name')
Expand Down

0 comments on commit e60f7d8

Please sign in to comment.