Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function getConfigTreeBuilder()
{
$supportedDrivers = array('orm', 'mongodb');

$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('pix_sortable_behavior');
$treeBuilder = new TreeBuilder('pix_sortable_behavior');
$rootNode = $treeBuilder->getRootNode();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a BC layer for this deprecation notice

Suggested change
$rootNode = $treeBuilder->getRootNode();
$builder = new TreeBuilder('pix_sortable_behavior');
if (\method_exists($builder, 'getRootNode')) {
$rootNode = $builder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $builder->root('pix_sortable_behavior');
}


$rootNode
->children()
Expand Down