migrationRepository->getMigrations(); if (count($versions) === 0) { throw RollupFailed::noMigrationsFound(); } if (count($versions) > 1) { throw RollupFailed::tooManyMigrations(); } $this->metadataStorage->reset(); $result = new ExecutionResult($versions->getItems()[0]->getVersion()); $this->metadataStorage->complete($result); return $result->getVersion(); } }