diff --git a/Command/CreateDatabaseDoctrineCommand.php b/Command/CreateDatabaseDoctrineCommand.php index a4c645c92..be160e05b 100644 --- a/Command/CreateDatabaseDoctrineCommand.php +++ b/Command/CreateDatabaseDoctrineCommand.php @@ -57,6 +57,11 @@ protected function execute(InputInterface $input, OutputInterface $output) $params = $params['master']; } + // Since doctrine/dbal 2.11 master has been replaced by primary + if (isset($params['primary'])) { + $params = $params['primary']; + } + // Cannot inject `shard` option in parent::getDoctrineConnection // cause it will try to connect to a non-existing database if (isset($params['shards'])) { diff --git a/Command/DropDatabaseDoctrineCommand.php b/Command/DropDatabaseDoctrineCommand.php index bbca6b3d0..6f7935279 100644 --- a/Command/DropDatabaseDoctrineCommand.php +++ b/Command/DropDatabaseDoctrineCommand.php @@ -66,6 +66,11 @@ protected function execute(InputInterface $input, OutputInterface $output) $params = $params['master']; } + // Since doctrine/dbal 2.11 master has been replaced by primary + if (isset($params['primary'])) { + $params = $params['primary']; + } + if (isset($params['shards'])) { $shards = $params['shards']; // Default select global