Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Merge pull request #97 from mhujer/symfony42
Browse files Browse the repository at this point in the history
Fix deprecation for symfony/config 4.2
  • Loading branch information
Sam Partington authored Dec 5, 2018
2 parents e6dcab5 + 32bf4fd commit 1400bc7
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 @@ -14,8 +14,14 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root("white_october_breadcrumbs");
$treeBuilder = new TreeBuilder("white_october_breadcrumbs");

if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root("white_october_breadcrumbs");
}

$rootNode->
children()->
Expand Down

0 comments on commit 1400bc7

Please sign in to comment.