Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
bug #594 Fix deprecation for symfony/config 4.2 (mhujer)
Browse files Browse the repository at this point in the history
This PR was merged into the 5.2.x-dev branch.

Discussion
----------

Fix deprecation for symfony/config 4.2

Fixed the same way as in doctrine/DoctrineBundle#853

Closes #593

Commits
-------

7db9568 Fix deprecation for symfony/config 4.2
  • Loading branch information
fabpot committed Nov 30, 2018
2 parents 9ef408f + 7db9568 commit a07247f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions DependencyInjection/Configuration.php
Expand Up @@ -29,8 +29,14 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('sensio_framework_extra', 'array');
$treeBuilder = new TreeBuilder('sensio_framework_extra');

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

$rootNode
->children()
Expand Down

0 comments on commit a07247f

Please sign in to comment.