Skip to content

Commit

Permalink
Merge pull request #953 from goetas/execute-update-call
Browse files Browse the repository at this point in the history
Remove superfluous parameters check on executeUpdate
  • Loading branch information
goetas committed Mar 28, 2020
2 parents 96a6832 + f0f1001 commit ed5b127
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/Doctrine/Migrations/Version/DbalExecutor.php
Expand Up @@ -291,16 +291,10 @@ private function logResult(Throwable $e, ExecutionResult $result, MigrationPlan
private function executeResult(MigratorConfiguration $configuration) : void
{
foreach ($this->sql as $key => $query) {
$stopwatchEvent = $this->stopwatch->start('query');

$this->outputSqlQuery($query);

if (count($query->getParameters()) === 0) {
$this->connection->executeUpdate($query->getStatement());
} else {
$this->connection->executeUpdate($query->getStatement(), $query->getParameters(), $query->getTypes());
}

$stopwatchEvent = $this->stopwatch->start('query');
$this->connection->executeUpdate($query->getStatement(), $query->getParameters(), $query->getTypes());
$stopwatchEvent->stop();

if (! $configuration->getTimeAllQueries()) {
Expand Down

0 comments on commit ed5b127

Please sign in to comment.