Skip to content

Commit

Permalink
Merge pull request #705 from xabbuh/patch-1
Browse files Browse the repository at this point in the history
fix compatibility with Symfony Config 4.2
  • Loading branch information
goetas committed Dec 9, 2018
2 parents 6f45a52 + 39f6d52 commit e523165
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 e523165

Please sign in to comment.