📜  TreeBuilder::getRootNode()" 不支持在创建根节点之前,迁移到新的构造函数签名代替. - PHP代码示例

📅  最后修改于: 2022-03-11 14:53:43.683000             🧑  作者: Mango

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