Skip to content
Permalink
Browse files

Removed deprecation warnings

  • Loading branch information...
core23 committed Dec 24, 2018
1 parent 9d18554 commit 236d792880b223325d904b97d59bb2acd0e56537
Showing with 9 additions and 5 deletions.
  1. +9 −5 src/DependencyInjection/Configuration.php
@@ -22,13 +22,17 @@ final class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$treeBuilder = new TreeBuilder('core23_sitemap');
/** @var ArrayNodeDefinition $node */
$node = $treeBuilder->root('core23_sitemap');
// Keep compatibility with symfony/config < 4.2
if (!\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->root('core23_sitemap');
} else {
$rootNode = $treeBuilder->getRootNode();
}
$this->addStaticUrlsSection($node);
$this->addCacheSection($node);
$this->addStaticUrlsSection($rootNode);
$this->addCacheSection($rootNode);
return $treeBuilder;
}

0 comments on commit 236d792

Please sign in to comment.
You can’t perform that action at this time.