Skip to content

Commit

Permalink
Merge pull request #815 from doctrine/fix-double-event
Browse files Browse the repository at this point in the history
Fixed event that was firing twice when it should only fire once.
  • Loading branch information
jwage committed Apr 25, 2019
2 parents 2d5c114 + c8ed964 commit 43280c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions lib/Doctrine/Migrations/Migrator.php
Expand Up @@ -160,8 +160,6 @@ private function executeMigration(
) : array {
$dryRun = $migratorConfiguration->isDryRun();

$this->configuration->dispatchMigrationEvent(Events::onMigrationsMigrating, $direction, $dryRun);

$connection = $this->configuration->getConnection();

$allOrNothing = $migratorConfiguration->isAllOrNothing();
Expand Down
Expand Up @@ -483,6 +483,7 @@ public function testSuccessfulMigrationDispatchesTheExpectedEvents() : void
Events::onMigrationsVersionExecuting,
Events::onMigrationsVersionExecuted,
] as $eventName) {
self::assertCount(1, $listener->events[$eventName]);
self::assertArrayHasKey($eventName, $listener->events);
}
}
Expand Down

0 comments on commit 43280c1

Please sign in to comment.