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