/**
* @return array{offset: int, total: int, isFinished: bool}
*/
public function migrate(int
$offset, Connection
$connection): array
{ $migrationLoader =
$this->migrationFactory->
getMigrationCollectionLoader($connection);
$coreMigrations =
$migrationLoader->
collectAllForVersion($this->version
);
if ($offset === 0
) { $this->adapter->
initializeShopwareDb($connection);
$coreMigrations->
sync();
} // use 7 s as max execution time, so the UI stays responsive
$maxExecutionTime =
min(\
ini_get('max_execution_time'
), 7
);
$startTime =
microtime(true
);
$executedMigrations =
$offset;
$stopped = false;
while (iterator_count($coreMigrations->
migrateInSteps(null, 1
)) === 1
) {