Skip to content

Commit

Permalink
Removed deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Dec 24, 2018
1 parent fb08e42 commit 751e20d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/DependencyInjection/Configuration.php
Expand Up @@ -22,13 +22,17 @@ final class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$treeBuilder = new TreeBuilder('core23_lastfm');

/** @var ArrayNodeDefinition $node */
$node = $treeBuilder->root('core23_lastfm');
// Keep compatibility with symfony/config < 4.2
if (!\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->root('core23_lastfm');
} else {
$rootNode = $treeBuilder->getRootNode();
}

$this->addApiSection($node);
$this->addHttpClientSection($node);
$this->addApiSection($rootNode);
$this->addHttpClientSection($rootNode);

return $treeBuilder;
}
Expand Down

0 comments on commit 751e20d

Please sign in to comment.