From 6cc2c91ee1bc826de195f9073794e8c3500e7c46 Mon Sep 17 00:00:00 2001 From: Richard Henkenjohann Date: Mon, 4 Mar 2024 07:21:51 +0100 Subject: [PATCH] Add loop control for migrations --- core-bundle/src/Command/MigrateCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core-bundle/src/Command/MigrateCommand.php b/core-bundle/src/Command/MigrateCommand.php index ae9d6273a7b..9476ae197bb 100644 --- a/core-bundle/src/Command/MigrateCommand.php +++ b/core-bundle/src/Command/MigrateCommand.php @@ -51,6 +51,8 @@ class MigrateCommand extends Command private ?Installer $installer; private ?SymfonyStyle $io = null; + private int $migrationsLoopControl = 9; + public function __construct(MigrationCollection $migrations, FileLocator $fileLocator, string $projectDir, ContaoFramework $framework, BackupManager $backupManager, SchemaProvider $schemaProvider, MysqlInnodbRowSizeCalculator $rowSizeCalculator, Connection $connection, Installer $installer = null) { $this->migrations = $migrations; @@ -250,7 +252,7 @@ private function hasWorkToDo(): bool private function executeMigrations(bool &$dryRun, bool $asJson, string $specifiedHash = null): bool { - while (true) { + while (--$this->migrationsLoopControl) { $first = true; $migrationLabels = [];