protected function getRootNode(TreeBuilder $treeBuilder, string $name)
    {
        if (\method_exists($treeBuilder, 'getRootNode')) {
            return $treeBuilder->getRootNode();
        } else {
            return $treeBuilder->root($name);
        }
    }