TreeBuilder::getRootNode()" before creating the root node is not supported, migrate to the new constructor signature instead.
snippet in php

TreeBuilder::getRootNode()" before creating the root node is not supported, migrate to the new constructor signature instead.

user6410

$treeBuilder = new TreeBuilder('bundle_id');
$rootNode = method_exists(TreeBuilder::class, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('bundle_id');