Skip to content

Commit

Permalink
Merge pull request #14 from rokka-io/fix-sf-42-deprecations
Browse files Browse the repository at this point in the history
Fix SF42 TreeBuilder deprecations
  • Loading branch information
michellesanver committed May 24, 2019
2 parents 6f02c95 + cd4182f commit 3c3064f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/DependencyInjection/Configuration.php
Expand Up @@ -9,9 +9,13 @@ class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();

$rootNode = $treeBuilder->root('rokka_client');
$treeBuilder = new TreeBuilder('rokka_client');
if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// symfony < 4.2 support
$rootNode = $treeBuilder->root('rokka_client');
}

$rootNode
->children()
Expand Down

0 comments on commit 3c3064f

Please sign in to comment.