From e1b98e4dc69e5cf748ab55868d12dbfec76f79fe Mon Sep 17 00:00:00 2001 From: gggeek Date: Wed, 26 Apr 2023 10:49:50 +0000 Subject: [PATCH] fix bad merge of changes from ezmb2 --- Core/MigrationService.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/MigrationService.php b/Core/MigrationService.php index 591b908..3d14946 100644 --- a/Core/MigrationService.php +++ b/Core/MigrationService.php @@ -333,6 +333,9 @@ public function executeMigration(MigrationDefinition $migrationDefinition, $migr } $forceExecution = array_key_exists('forceExecution', $migrationContext) ? $migrationContext['forceExecution'] : false; + /// @todo log a warning if there are already db transactions active (an active pdo-only transaction will result in an + /// exception, but a dbal transaction will result in not committing immediately transaction status update) + // set migration as begun - has to be in own db transaction $migration = $this->storageHandler->startMigration($migrationDefinition, $forceExecution); @@ -359,8 +362,8 @@ protected function executeMigrationInner(Migration $migration, MigrationDefiniti } // BC: handling of legacy method call signature - $useTransaction = array_key_exists('useTransaction', $migrationContext) ? $migrationContext['useTransaction'] : true; - $adminLogin = array_key_exists('adminLogin', $migrationContext) ? $migrationContext['adminLogin'] : null; + $useTransaction = array_key_exists('useTransaction', $migrationContext) ? $migrationContext['useTransaction'] : $useTransaction; + $adminLogin = array_key_exists('adminLogin', $migrationContext) ? $migrationContext['adminLogin'] : $adminLogin; $messageSuffix = ''; if (isset($migrationContext['forcedReferences']) && count($migrationContext['forcedReferences'])) {