[BUGFIX] Do not mark wizards implementing RepeatableInterface done 01/58301/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 17 Sep 2018 11:03:05 +0000 (13:03 +0200)
committerBenni Mack <benni@typo3.org>
Tue, 18 Sep 2018 18:04:56 +0000 (20:04 +0200)
Resolves: #86283
Releases: master
Change-Id: Id2fad147fd081e86ecb1b40e0b407b17f60c74d8
Reviewed-on: https://review.typo3.org/58301
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/install/Classes/Command/UpgradeWizardRunCommand.php

index 45cdfdf..4d9578d 100644 (file)
@@ -29,6 +29,7 @@ use TYPO3\CMS\Install\Service\UpgradeWizardsService;
 use TYPO3\CMS\Install\Updates\ChattyInterface;
 use TYPO3\CMS\Install\Updates\ConfirmableInterface;
 use TYPO3\CMS\Install\Updates\PrerequisiteCollection;
+use TYPO3\CMS\Install\Updates\RepeatableInterface;
 use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
 
 /**
@@ -156,8 +157,12 @@ class UpgradeWizardRunCommand extends Command
         if ($wizardInstance->updateNecessary()) {
             return $wizardInstance;
         }
-        $this->output->note('Wizard ' . $identifier . ' does not need to make changes. Marking wizard as done.');
-        $this->upgradeWizardsService->markWizardAsDone($identifier);
+        if ($wizardInstance instanceof RepeatableInterface) {
+            $this->output->note('Wizard ' . $identifier . ' does not need to make changes.');
+        } else {
+            $this->output->note('Wizard ' . $identifier . ' does not need to make changes. Marking wizard as done.');
+            $this->upgradeWizardsService->markWizardAsDone($identifier);
+        }
         return null;
     }
 
@@ -224,14 +229,20 @@ class UpgradeWizardRunCommand extends Command
             );
             $helper = $this->getHelper('question');
             if (!$helper->ask($this->input, $this->output, $question)) {
-                $this->upgradeWizardsService->markWizardAsDone($instance->getIdentifier());
-                $this->output->note('No changes applied, marking wizard as done.');
+                if ($instance instanceof RepeatableInterface) {
+                    $this->output->note('No changes applied.');
+                } else {
+                    $this->upgradeWizardsService->markWizardAsDone($instance->getIdentifier());
+                    $this->output->note('No changes applied, marking wizard as done.');
+                }
                 return 0;
             }
         }
         if ($instance->executeUpdate()) {
             $this->output->success('Successfully ran wizard ' . $instance->getTitle());
-            $this->upgradeWizardsService->markWizardAsDone($instance->getIdentifier());
+            if (!$instance instanceof RepeatableInterface) {
+                $this->upgradeWizardsService->markWizardAsDone($instance->getIdentifier());
+            }
             return 0;
         }
         $this->output->error('<error>Something went wrong while running ' . $instance->getTitle() . '</error>');