Skip to content

Commit

Permalink
Fix deprecation on symfony/config 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chalasr authored and alcaeus committed Dec 3, 2018
1 parent e6e352f commit 593cfab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion DependencyInjection/Configuration.php
Expand Up @@ -21,7 +21,13 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('doctrine_migrations', 'array');

if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('doctrine_migrations', 'array');
}

$organizeMigrationModes = $this->getOrganizeMigrationsModes();

Expand Down

0 comments on commit 593cfab

Please sign in to comment.