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 e16ce0c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions DependencyInjection/Configuration.php
Expand Up @@ -20,8 +20,14 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('doctrine_migrations', 'array');
$treeBuilder = new TreeBuilder('doctrine_migrations');

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 e16ce0c

Please sign in to comment.