Skip to content

Commit

Permalink
fix compatibility with Symfony Config 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Dec 8, 2018
1 parent 6f45a52 commit 39f6d52
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions DependencyInjection/Configuration.php
Expand Up @@ -22,12 +22,13 @@ public function __construct($debug = false)

public function getConfigTreeBuilder()
{
$tb = new TreeBuilder();
$tb = new TreeBuilder('jms_serializer');

$root = $tb
->root('jms_serializer', 'array')
->children()
;
if (method_exists($tb, 'getRootNode')) {
$root = $tb->getRootNode()->children();
} else {
$root = $tb->root('jms_serializer')->children();
}

$this->addHandlersSection($root);
$this->addSubscribersSection($root);
Expand Down

0 comments on commit 39f6d52

Please sign in to comment.