diff --git a/lib/Doctrine/Migrations/Version/Executor.php b/lib/Doctrine/Migrations/Version/Executor.php index 7d9d38c191..5e8f3e18ed 100644 --- a/lib/Doctrine/Migrations/Version/Executor.php +++ b/lib/Doctrine/Migrations/Version/Executor.php @@ -345,10 +345,11 @@ private function executeVersionExecutionResult( $this->outputSqlQuery($key, $query); + // Do not use method that returns results here, to not block next queries if (! isset($this->params[$key])) { - $this->connection->executeUpdate($query); + $this->connection->executeQuery($query); } else { - $this->connection->executeUpdate($query, $this->params[$key], $this->types[$key]); + $this->connection->executeQuery($query, $this->params[$key], $this->types[$key]); } $stopwatchEvent->stop(); diff --git a/tests/Doctrine/Migrations/Tests/Version/ExecutorTest.php b/tests/Doctrine/Migrations/Tests/Version/ExecutorTest.php index 86e8c993d8..306600d3b5 100644 --- a/tests/Doctrine/Migrations/Tests/Version/ExecutorTest.php +++ b/tests/Doctrine/Migrations/Tests/Version/ExecutorTest.php @@ -108,26 +108,6 @@ public function testExecuteUp() : void self::assertFalse($this->migration->postDownExecuted); } - public function testExecuteUsedExecuteUpdate() : void - { - $this->connection - ->expects(self::never()) - ->method('executeQuery'); - $this->connection - ->expects(self::exactly(2)) - ->method('executeUpdate'); - - $migratorConfiguration = (new MigratorConfiguration()) - ->setTimeAllQueries(true); - - $this->versionExecutor->execute( - $this->version, - $this->migration, - Direction::UP, - $migratorConfiguration - ); - } - /** * @test */