[BUGFIX] Ignore wizards with no upgrades in report 48/59048/2
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Thu, 6 Dec 2018 21:57:39 +0000 (22:57 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Sat, 8 Dec 2018 22:16:23 +0000 (23:16 +0100)
The reports module now ignores upgrade wizards that do
not have any necessary upgrades (shouldRenderWizard property
is false).

This makes the behavior fully consistent with the install tool
because there the wizards that should not be rendered are not
displayed either.

Resolves: #86632
Releases: master
Change-Id: I87caf45023a0ca4eca71418e029bc8ed7091c0e4
Reviewed-on: https://review.typo3.org/59048
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wittkiel Gruppe <ts@wittkiel-gruppe.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Joerg Kummer <typo3@enobe.de>
Tested-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/install/Classes/Report/InstallStatusReport.php

index 8e2e06a..f5ae843 100644 (file)
@@ -142,6 +142,27 @@ class InstallStatusReport implements \TYPO3\CMS\Reports\StatusProviderInterface
     }
 
     /**
+     * Returns all incomplete update wizards.
+     *
+     * Fetches all wizards that are not marked "done" in the registry and filters out
+     * the ones that should not be rendered (= no upgrade required).
+     *
+     * @return array
+     */
+    protected function getIncompleteWizards(): array
+    {
+        $upgradeWizardsService = GeneralUtility::makeInstance(UpgradeWizardsService::class);
+        $incompleteWizards = $upgradeWizardsService->getUpgradeWizardsList();
+        $incompleteWizards = array_filter(
+            $incompleteWizards,
+            function ($wizard) {
+                return $wizard['shouldRenderWizard'];
+            }
+        );
+        return $incompleteWizards;
+    }
+
+    /**
      * Checks if there are still updates to perform
      *
      * @return Status Represents whether the installation is completely updated yet
@@ -155,8 +176,7 @@ class InstallStatusReport implements \TYPO3\CMS\Reports\StatusProviderInterface
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
         $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
         // check if there are update wizards left to perform
-        $upgradeWizardsService = GeneralUtility::makeInstance(UpgradeWizardsService::class);
-        $incompleteWizards = $upgradeWizardsService->getUpgradeWizardsList();
+        $incompleteWizards = $this->getIncompleteWizards();
         if (count($incompleteWizards)) {
             // At least one incomplete wizard was found
             $value = $languageService->getLL('status_updateIncomplete');