[TASK] Clean up UpgradeWizardsService API 99/58199/2
authorHelmut Hummel <typo3@helhum.io>
Thu, 6 Sep 2018 10:44:16 +0000 (12:44 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 7 Sep 2018 09:34:46 +0000 (11:34 +0200)
Remove implementation details from public API methods

Releases: master
Resolves: #86166
Change-Id: I3605132946d4fa1e92eccfa91498290dab4762c2
Reviewed-on: https://review.typo3.org/58199
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/install/Classes/Controller/UpgradeController.php
typo3/sysext/install/Classes/Service/UpgradeWizardsService.php

index a74d0c6..78fd13c 100644 (file)
@@ -895,8 +895,8 @@ class UpgradeController extends AbstractController
     {
         $this->loadExtLocalconfDatabaseAndExtTables();
         $upgradeWizardsService = new UpgradeWizardsService();
-        $wizardsDone = $upgradeWizardsService->listOfWizardsDoneInRegistry();
-        $rowUpdatersDone = $upgradeWizardsService->listOfRowUpdatersDoneInRegistry();
+        $wizardsDone = $upgradeWizardsService->listOfWizardsDone();
+        $rowUpdatersDone = $upgradeWizardsService->listOfRowUpdatersDone();
         $messages = new FlashMessageQueue('install');
         if (empty($wizardsDone) && empty($rowUpdatersDone)) {
             $messages->enqueue(new FlashMessage(
@@ -981,7 +981,7 @@ class UpgradeController extends AbstractController
         $this->loadExtLocalconfDatabaseAndExtTables();
         $wizardToBeMarkedAsUndoneIdentifier = $request->getParsedBody()['install']['identifier'];
         $upgradeWizardsService = new UpgradeWizardsService();
-        $result = $upgradeWizardsService->markWizardUndoneInRegistry($wizardToBeMarkedAsUndoneIdentifier);
+        $result = $upgradeWizardsService->markWizardUndone($wizardToBeMarkedAsUndoneIdentifier);
         $messages = new FlashMessageQueue('install');
         if ($result) {
             $messages->enqueue(new FlashMessage(
index 27f0388..0a420e3 100644 (file)
@@ -71,7 +71,7 @@ class UpgradeWizardsService
     /**
      * @return array List of wizards marked as done in registry
      */
-    public function listOfWizardsDoneInRegistry(): array
+    public function listOfWizardsDone(): array
     {
         $wizardsDoneInRegistry = [];
         $registry = GeneralUtility::makeInstance(Registry::class);
@@ -92,7 +92,7 @@ class UpgradeWizardsService
      * @return array List of row updaters marked as done in registry
      * @throws \RuntimeException
      */
-    public function listOfRowUpdatersDoneInRegistry(): array
+    public function listOfRowUpdatersDone(): array
     {
         $registry = GeneralUtility::makeInstance(Registry::class);
         $rowUpdatersDoneClassNames = $registry->get('installUpdateRows', 'rowUpdatersDone', []);
@@ -126,11 +126,11 @@ class UpgradeWizardsService
      * @param string $identifier Wizard or RowUpdater identifier
      * @return bool True if wizard has been marked as undone
      */
-    public function markWizardUndoneInRegistry(string $identifier): bool
+    public function markWizardUndone(string $identifier): bool
     {
         $registry = GeneralUtility::makeInstance(Registry::class);
         $aWizardHasBeenMarkedUndone = false;
-        $wizardsDoneList = $this->listOfWizardsDoneInRegistry();
+        $wizardsDoneList = $this->listOfWizardsDone();
         foreach ($wizardsDoneList as $wizard) {
             if ($wizard['identifier'] === $identifier) {
                 $aWizardHasBeenMarkedUndone = true;
@@ -138,7 +138,7 @@ class UpgradeWizardsService
             }
         }
         if (!$aWizardHasBeenMarkedUndone) {
-            $rowUpdatersDoneList = $this->listOfRowUpdatersDoneInRegistry();
+            $rowUpdatersDoneList = $this->listOfRowUpdatersDone();
             $registryArray = $registry->get('installUpdateRows', 'rowUpdatersDone', []);
             foreach ($rowUpdatersDoneList as $rowUpdater) {
                 if ($rowUpdater['identifier'] === $identifier) {