private function createNode($name)
    {
        $treeBuilder = new TreeBuilder($name);
        if (\method_exists($treeBuilder, 'getRootNode')) {
            $rootNode = $treeBuilder->getRootNode();
        } else {
            $rootNode = $treeBuilder->root($name);
        }

        return $rootNode;
    }