[TASK] Install tool: Use ext:core messaging 35/53835/12
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 30 Aug 2017 10:39:07 +0000 (12:39 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 31 Aug 2017 15:27:50 +0000 (17:27 +0200)
The install tool brought its own "status message" class
structure since the 6.2 refactoring. This is used at many
places in the install tool for message handling.

The core has a very similar class construct "Messaging"
with only little dependencies, too. To simplify a later
separation of 'install tool' and 'installer' the internal
status message class structure is removed and transitioned
to the core Messaging structure. to get rid of just
another special thing the install tool does.

The ext:core FlashMessage and FlashMessageQueue now both
implement the \JsonSerialize interface. This allows direct
json_encode() calls on these objects, helpful for instance
for ajax responses.

In ext:install "Environment checks" suhosin specific checks
have been removed since the project is dead and only has a
pre-alpha php 7.0 fork, so probably nobody is using
that with the given core PHP constraints anymore.

Change-Id: Ifecd3cd4889d8db5aaf3e87f317c98be706ae82b
Resolves: #82257
Releases: master
Reviewed-on: https://review.typo3.org/53835
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
85 files changed:
typo3/sysext/core/Classes/Messaging/AbstractMessage.php
typo3/sysext/core/Classes/Messaging/FlashMessageQueue.php
typo3/sysext/core/Tests/Unit/FormProtection/FormProtectionFactoryTest.php
typo3/sysext/core/Tests/Unit/Messaging/FlashMessageQueueTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Messaging/FlashMessageTest.php [new file with mode: 0644]
typo3/sysext/install/Classes/Controller/AbstractController.php
typo3/sysext/install/Classes/Controller/Action/Ajax/ChangeInstallToolPassword.php
typo3/sysext/install/Classes/Controller/Action/Ajax/ClearAllCache.php
typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTablesClear.php
typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTypo3tempFiles.php
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateAbstract.php
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateIsUpdateAvailable.php
typo3/sysext/install/Classes/Controller/Action/Ajax/CreateAdmin.php
typo3/sysext/install/Classes/Controller/Action/Ajax/DatabaseAnalyzerAnalyze.php
typo3/sysext/install/Classes/Controller/Action/Ajax/DatabaseAnalyzerExecute.php
typo3/sysext/install/Classes/Controller/Action/Ajax/DumpAutoload.php
typo3/sysext/install/Classes/Controller/Action/Ajax/EnvironmentCheckGetStatus.php
typo3/sysext/install/Classes/Controller/Action/Ajax/FolderStructureGetStatus.php
typo3/sysext/install/Classes/Controller/Action/Ajax/ImageProcessing.php
typo3/sysext/install/Classes/Controller/Action/Ajax/LocalConfigurationWrite.php
typo3/sysext/install/Classes/Controller/Action/Ajax/MailTest.php
typo3/sysext/install/Classes/Controller/Action/Ajax/PresetActivate.php
typo3/sysext/install/Classes/Controller/Action/Ajax/ResetBackendUserUc.php
typo3/sysext/install/Classes/Controller/Action/Ajax/TcaExtTablesCheck.php
typo3/sysext/install/Classes/Controller/Action/Ajax/TcaMigrationsCheck.php
typo3/sysext/install/Classes/Controller/Action/Ajax/UninstallExtension.php
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseCharsetFix.php
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseExecute.php
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsDoneUpgrades.php
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsInput.php
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsList.php
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsMarkUndone.php
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsSilentUpgrades.php
typo3/sysext/install/Classes/Controller/Action/Common/InstallToolDisabledAction.php
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseData.php
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseSelect.php
typo3/sysext/install/Classes/Controller/Action/Step/DefaultConfiguration.php
typo3/sysext/install/Classes/Controller/Action/Step/EnvironmentAndFolders.php
typo3/sysext/install/Classes/Controller/Action/Step/StepInterface.php
typo3/sysext/install/Classes/Exception/AuthenticationRequiredException.php
typo3/sysext/install/Classes/FolderStructure/AbstractNode.php
typo3/sysext/install/Classes/FolderStructure/DefaultPermissionsCheck.php
typo3/sysext/install/Classes/FolderStructure/DirectoryNode.php
typo3/sysext/install/Classes/FolderStructure/FileNode.php
typo3/sysext/install/Classes/FolderStructure/LinkNode.php
typo3/sysext/install/Classes/FolderStructure/NodeInterface.php
typo3/sysext/install/Classes/FolderStructure/RootNode.php
typo3/sysext/install/Classes/FolderStructure/StructureFacade.php
typo3/sysext/install/Classes/FolderStructure/StructureFacadeInterface.php
typo3/sysext/install/Classes/Http/RecoveryRequestHandler.php
typo3/sysext/install/Classes/Http/RequestHandler.php
typo3/sysext/install/Classes/Report/EnvironmentStatusReport.php
typo3/sysext/install/Classes/Service/CoreUpdateService.php
typo3/sysext/install/Classes/Service/LocalConfigurationValueService.php
typo3/sysext/install/Classes/Service/SessionService.php
typo3/sysext/install/Classes/Service/UpgradeWizardsService.php
typo3/sysext/install/Classes/Status/AbstractStatus.php [deleted file]
typo3/sysext/install/Classes/Status/AlertStatus.php [deleted file]
typo3/sysext/install/Classes/Status/ErrorStatus.php [deleted file]
typo3/sysext/install/Classes/Status/Exception.php [deleted file]
typo3/sysext/install/Classes/Status/InfoStatus.php [deleted file]
typo3/sysext/install/Classes/Status/LoadingStatus.php [deleted file]
typo3/sysext/install/Classes/Status/NoticeStatus.php [deleted file]
typo3/sysext/install/Classes/Status/OkStatus.php [deleted file]
typo3/sysext/install/Classes/Status/StatusInterface.php [deleted file]
typo3/sysext/install/Classes/Status/StatusUtility.php [deleted file]
typo3/sysext/install/Classes/Status/WarningStatus.php [deleted file]
typo3/sysext/install/Classes/SystemEnvironment/Check.php
typo3/sysext/install/Classes/SystemEnvironment/CheckInterface.php
typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck.php
typo3/sysext/install/Classes/SystemEnvironment/DatabasePlatform/MySqlCheck.php
typo3/sysext/install/Classes/SystemEnvironment/DatabasePlatform/PostgreSqlCheck.php
typo3/sysext/install/Classes/SystemEnvironment/SetupCheck.php
typo3/sysext/install/Resources/Private/Partials/Action/Common/StatusMessage.html
typo3/sysext/install/Tests/Unit/FolderStructure/AbstractNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/DefaultFactoryTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/DirectoryNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/FileNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/LinkNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/RootNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/StructureFacadeTest.php
typo3/sysext/install/Tests/Unit/Service/CoreUpdateServiceTest.php
typo3/sysext/install/Tests/Unit/Status/AbstractStatusTest.php [deleted file]
typo3/sysext/install/Tests/Unit/Status/StatusUtilityTest.php [deleted file]

index 403fd1e..abd7af7 100644 (file)
@@ -20,7 +20,7 @@ use TYPO3\CMS\Core\Utility\MathUtility;
 /**
  * A class used for any kind of messages.
  */
-abstract class AbstractMessage
+abstract class AbstractMessage implements \JsonSerializable
 {
     const NOTICE = -2;
     const INFO = -1;
@@ -130,4 +130,16 @@ abstract class AbstractMessage
         }
         return $severities[$this->severity] . $title . ': ' . $this->message;
     }
+
+    /**
+     * @return array Data which can be serialized by json_encode()
+     */
+    public function jsonSerialize(): array
+    {
+        return [
+            'severity' => $this->getSeverity(),
+            'title' => $this->getTitle(),
+            'message' => $this->getMessage(),
+        ];
+    }
 }
index 6f9cbcf..4633b8d 100644 (file)
@@ -21,7 +21,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 /**
  * A class which collects and renders flash messages.
  */
-class FlashMessageQueue extends \SplQueue
+class FlashMessageQueue extends \SplQueue implements \JsonSerializable
 {
     /**
      * A unique identifier for this queue
@@ -52,8 +52,9 @@ class FlashMessageQueue extends \SplQueue
      *
      * @param FlashMessage $message Instance of \TYPO3\CMS\Core\Messaging\FlashMessage, representing a message
      * @throws \TYPO3\CMS\Core\Exception
+     * @return FlashMessageQueue Self to allow chaining
      */
-    public function enqueue($message)
+    public function enqueue($message): FlashMessageQueue
     {
         if (!($message instanceof FlashMessage)) {
             throw new \TYPO3\CMS\Core\Exception(
@@ -66,6 +67,7 @@ class FlashMessageQueue extends \SplQueue
         } else {
             parent::enqueue($message);
         }
+        return $this;
     }
 
     /**
@@ -175,10 +177,15 @@ class FlashMessageQueue extends \SplQueue
      *
      * @return FlashMessage[]
      */
-    protected function getFlashMessagesFromSession()
+    protected function getFlashMessagesFromSession(): array
     {
-        $flashMessages = $this->getUserByContext()->getSessionData($this->identifier);
-        return is_array($flashMessages) ? $flashMessages : [];
+        $sessionMessages = [];
+        $user = $this->getUserByContext();
+        if ($user instanceof AbstractUserAuthentication) {
+            $sessionMessages = $user->getSessionData($this->identifier);
+            $sessionMessages = is_array($sessionMessages) ? $sessionMessages : [];
+        }
+        return $sessionMessages;
     }
 
     /**
@@ -256,4 +263,12 @@ class FlashMessageQueue extends \SplQueue
             }
         }
     }
+
+    /**
+     * @return array Data which can be serialized by json_encode()
+     */
+    public function jsonSerialize(): array
+    {
+        return $this->toArray();
+    }
 }
index 09cb5dc..711eefe 100644 (file)
@@ -14,13 +14,19 @@ namespace TYPO3\CMS\Core\Tests\Unit\FormProtection;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Core\FormProtection\BackendFormProtection;
+use TYPO3\CMS\Core\FormProtection\DisabledFormProtection;
 use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
+use TYPO3\CMS\Core\FormProtection\InstallToolFormProtection;
 use TYPO3\CMS\Core\Registry;
+use TYPO3\CMS\Core\Tests\Unit\FormProtection\Fixtures\FormProtectionTesting;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
  * Testcase
  */
-class FormProtectionFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class FormProtectionFactoryTest extends UnitTestCase
 {
     protected function tearDown()
     {
@@ -50,7 +56,7 @@ class FormProtectionFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1285353026);
 
-        FormProtectionFactory::get(\TYPO3\CMS\Core\Tests\Unit\FormProtection\FormProtectionFactoryTest::class);
+        FormProtectionFactory::get(self::class);
     }
 
     /**
@@ -58,12 +64,12 @@ class FormProtectionFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
      */
     public function getForTypeBackEndWithExistingBackEndReturnsBackEndFormProtection()
     {
-        $userMock = $this->createMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
+        $userMock = $this->createMock(BackendUserAuthentication::class);
         $userMock->user = ['uid' => $this->getUniqueId()];
         $this->assertInstanceOf(
-            \TYPO3\CMS\Core\FormProtection\BackendFormProtection::class,
+            BackendFormProtection::class,
             FormProtectionFactory::get(
-                \TYPO3\CMS\Core\FormProtection\BackendFormProtection::class,
+                BackendFormProtection::class,
                 $userMock,
                 $this->createMock(Registry::class)
             )
@@ -75,10 +81,10 @@ class FormProtectionFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
      */
     public function getForTypeBackEndCalledTwoTimesReturnsTheSameInstance()
     {
-        $userMock = $this->createMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
+        $userMock = $this->createMock(BackendUserAuthentication::class);
         $userMock->user = ['uid' => $this->getUniqueId()];
         $arguments = [
-            \TYPO3\CMS\Core\FormProtection\BackendFormProtection::class,
+            BackendFormProtection::class,
             $userMock,
             $this->createMock(Registry::class)
         ];
@@ -93,7 +99,7 @@ class FormProtectionFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
      */
     public function getForTypeInstallToolReturnsInstallToolFormProtection()
     {
-        $this->assertTrue(FormProtectionFactory::get(\TYPO3\CMS\Core\FormProtection\InstallToolFormProtection::class) instanceof \TYPO3\CMS\Core\FormProtection\InstallToolFormProtection);
+        $this->assertTrue(FormProtectionFactory::get(InstallToolFormProtection::class) instanceof InstallToolFormProtection);
     }
 
     /**
@@ -101,7 +107,7 @@ class FormProtectionFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
      */
     public function getForTypeInstallToolCalledTwoTimesReturnsTheSameInstance()
     {
-        $this->assertSame(FormProtectionFactory::get(\TYPO3\CMS\Core\FormProtection\InstallToolFormProtection::class), FormProtectionFactory::get(\TYPO3\CMS\Core\FormProtection\InstallToolFormProtection::class));
+        $this->assertSame(FormProtectionFactory::get(InstallToolFormProtection::class), FormProtectionFactory::get(InstallToolFormProtection::class));
     }
 
     /**
@@ -109,7 +115,7 @@ class FormProtectionFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
      */
     public function getForTypesInstallToolAndDisabledReturnsDifferentInstances()
     {
-        $this->assertNotSame(FormProtectionFactory::get(\TYPO3\CMS\Core\FormProtection\InstallToolFormProtection::class), FormProtectionFactory::get(\TYPO3\CMS\Core\FormProtection\DisabledFormProtection::class));
+        $this->assertNotSame(FormProtectionFactory::get(InstallToolFormProtection::class), FormProtectionFactory::get(DisabledFormProtection::class));
     }
 
     /////////////////////////
@@ -120,9 +126,9 @@ class FormProtectionFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
      */
     public function setSetsInstanceForType()
     {
-        $instance = new \TYPO3\CMS\Core\Tests\Unit\FormProtection\Fixtures\FormProtectionTesting();
-        FormProtectionFactory::set(\TYPO3\CMS\Core\FormProtection\BackendFormProtection::class, $instance);
-        $this->assertSame($instance, FormProtectionFactory::get(\TYPO3\CMS\Core\FormProtection\BackendFormProtection::class));
+        $instance = new FormProtectionTesting();
+        FormProtectionFactory::set(BackendFormProtection::class, $instance);
+        $this->assertSame($instance, FormProtectionFactory::get(BackendFormProtection::class));
     }
 
     /**
@@ -130,33 +136,8 @@ class FormProtectionFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
      */
     public function setNotSetsInstanceForOtherType()
     {
-        $instance = new \TYPO3\CMS\Core\Tests\Unit\FormProtection\Fixtures\FormProtectionTesting();
-        FormProtectionFactory::set(\TYPO3\CMS\Core\FormProtection\BackendFormProtection::class, $instance);
-        $this->assertNotSame($instance, FormProtectionFactory::get(\TYPO3\CMS\Core\FormProtection\InstallToolFormProtection::class));
-    }
-
-    /**
-     * @test
-     */
-    public function createValidationErrorMessageAddsErrorFlashMessageButNotInSessionInAjaxRequest()
-    {
-        $flashMessageQueueMock = $this->createMock(\TYPO3\CMS\Core\Messaging\FlashMessageQueue::class);
-        $flashMessageQueueMock
-            ->expects($this->once())
-            ->method('enqueue')
-            ->with($this->isInstanceOf(\TYPO3\CMS\Core\Messaging\FlashMessage::class))
-            ->will($this->returnCallback([$this, 'enqueueAjaxFlashMessageCallback']));
-        $languageServiceMock = $this->createMock(\TYPO3\CMS\Core\Localization\LanguageService::class);
-        $languageServiceMock->expects($this->once())->method('sL')->will($this->returnValue('foo'));
-
-        FormProtectionFactory::getMessageClosure($languageServiceMock, $flashMessageQueueMock, true)->__invoke();
-    }
-
-    /**
-     * @param \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage
-     */
-    public function enqueueAjaxFlashMessageCallback(\TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage)
-    {
-        $this->assertFalse($flashMessage->isSessionMessage());
+        $instance = new FormProtectionTesting();
+        FormProtectionFactory::set(BackendFormProtection::class, $instance);
+        $this->assertNotSame($instance, FormProtectionFactory::get(InstallToolFormProtection::class));
     }
 }
diff --git a/typo3/sysext/core/Tests/Unit/Messaging/FlashMessageQueueTest.php b/typo3/sysext/core/Tests/Unit/Messaging/FlashMessageQueueTest.php
new file mode 100644 (file)
index 0000000..6ffa390
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Unit\Messaging;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
+/**
+ * Test case
+ */
+class FlashMessageQueueTest extends UnitTestCase
+{
+    /**
+     * @test
+     */
+    public function jsonSerializeReturnsArrayWithMessages()
+    {
+        $message = new FlashMessage('testMessage');
+        $subject= (new FlashMessageQueue('testing'))->enqueue($message);
+        $this->assertEquals([ $message ], $subject->jsonSerialize());
+    }
+}
diff --git a/typo3/sysext/core/Tests/Unit/Messaging/FlashMessageTest.php b/typo3/sysext/core/Tests/Unit/Messaging/FlashMessageTest.php
new file mode 100644 (file)
index 0000000..b70658f
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+declare(strict_types=1);
+namespace TYPO3\CMS\Core\Tests\Unit\Messaging;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
+/**
+ * Test case
+ */
+class FlashMessageTest extends UnitTestCase
+{
+    /**
+     * @test
+     */
+    public function jsonSerializeReturnsArrayWithDetailData()
+    {
+        $message = new FlashMessage('aMessage', 'aTitle', FlashMessage::INFO);
+        $expected = [
+            'severity' => FlashMessage::INFO,
+            'title' => 'aTitle',
+            'message' => 'aMessage',
+        ];
+        $this->assertEquals($expected, $message->jsonSerialize());
+    }
+}
index c449a81..c639f58 100644 (file)
@@ -14,9 +14,12 @@ namespace TYPO3\CMS\Install\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Install\Controller\Action\Common\LoginForm;
 use TYPO3\CMS\Install\Controller\Exception\RedirectException;
 use TYPO3\CMS\Install\Exception\AuthenticationRequiredException;
+use TYPO3\CMS\Install\Service\EnableFileService;
 use TYPO3\CMS\Install\Service\SessionService;
 
 /**
@@ -47,8 +50,8 @@ class AbstractController
      */
     protected function isInstallToolAvailable()
     {
-        /** @var \TYPO3\CMS\Install\Service\EnableFileService $installToolEnableService */
-        $installToolEnableService = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Service\EnableFileService::class);
+        /** @var EnableFileService $installToolEnableService */
+        $installToolEnableService = GeneralUtility::makeInstance(EnableFileService::class);
         if ($installToolEnableService->isFirstInstallAllowed()) {
             return true;
         }
@@ -58,13 +61,13 @@ class AbstractController
     /**
      * Show login form
      *
-     * @param \TYPO3\CMS\Install\Status\StatusInterface $message Optional status message from controller
+     * @param FlashMessage $message Optional status message from controller
      * @return string Rendered HTML
      */
-    public function loginForm(\TYPO3\CMS\Install\Status\StatusInterface $message = null)
+    public function loginForm(FlashMessage $message = null)
     {
-        /** @var \TYPO3\CMS\Install\Controller\Action\Common\LoginForm $action */
-        $action = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Controller\Action\Common\LoginForm::class);
+        /** @var LoginForm $action */
+        $action = GeneralUtility::makeInstance(LoginForm::class);
         $action->setController('common');
         $action->setAction('login');
         $action->setToken($this->generateTokenForAction('login'));
@@ -120,10 +123,11 @@ class AbstractController
                 $messageText = 'Given password does not match the install tool login password. ' .
                         'Calculated hash: ' . $hashedPassword;
             }
-            /** @var $message \TYPO3\CMS\Install\Status\ErrorStatus */
-            $message = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Status\ErrorStatus::class);
-            $message->setTitle('Login failed');
-            $message->setMessage($messageText);
+            $message = new FlashMessage(
+                $messageText,
+                'Login failed',
+                FlashMessage::ERROR
+            );
             $this->sendLoginFailedMail();
             throw new AuthenticationRequiredException('Login failed', 1504031979, null, $message);
         }
@@ -226,7 +230,7 @@ class AbstractController
      * Add status messages to session.
      * Used to output messages between requests, especially in step controller
      *
-     * @param array<\TYPO3\CMS\Install\Status\StatusInterface> $messages
+     * @param FlashMessage[] $messages
      */
     protected function addSessionMessages(array $messages)
     {
index df47cb6..92b7f38 100644 (file)
@@ -16,9 +16,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  */
 
 use TYPO3\CMS\Core\Configuration\ConfigurationManager;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Change install tool password
@@ -34,31 +34,32 @@ class ChangeInstallToolPassword extends AbstractAjaxAction
     {
         $password = $this->postValues['password'];
         $passwordCheck = $this->postValues['passwordCheck'];
-        $messages = [];
+        $messageQueue = new FlashMessageQueue('install');
+
         if ($password !== $passwordCheck) {
-            $message = new ErrorStatus();
-            $message->setTitle('Install tool password not changed');
-            $message->setMessage('Given passwords do not match.');
-            $messages[] = $message;
+            $messageQueue->enqueue(new FlashMessage(
+                'Install tool password not changed. Given passwords do not match.',
+                '',
+                FlashMessage::ERROR
+            ));
         } elseif (strlen($password) < 8) {
-            $message = new ErrorStatus();
-            $message->setTitle('Install tool password not changed');
-            $message->setMessage('Given password must be at least eight characters long.');
-            $messages[] = $message;
+            $messageQueue->enqueue(new FlashMessage(
+                'Install tool password not changed. Given password must be at least eight characters long.',
+                '',
+                FlashMessage::ERROR
+            ));
         } else {
             $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
             $configurationManager->setLocalConfigurationValueByPath(
                 'BE/installToolPassword',
                 $this->getHashedPassword($password)
             );
-            $message = new OkStatus();
-            $message->setTitle('Install tool password changed');
-            $messages[] = $message;
+            $messageQueue->enqueue(new FlashMessage('Install tool password changed'));
         }
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $messages,
+            'status' => $messageQueue,
         ]);
         return $this->view->render();
     }
index 39cfdb1..4782443 100644 (file)
@@ -15,11 +15,11 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Service\OpcodeCacheService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\Service\ClearCacheService;
-use TYPO3\CMS\Install\Status\OkStatus;
-use TYPO3\CMS\Install\Status\StatusInterface;
 
 /**
  * Clear Cache
@@ -35,40 +35,17 @@ class ClearAllCache extends AbstractAjaxAction
      */
     protected function executeAction(): array
     {
-        $statusMessages[] = $this->clearAllCache();
-        $statusMessages[] = $this->clearOpcodeCache();
+        GeneralUtility::makeInstance(ClearCacheService::class)->clearAll();
+        GeneralUtility::makeInstance(OpcodeCacheService::class)->clearAllActive();
+
+        $messageQueue = (new FlashMessageQueue('install'))->enqueue(
+            new FlashMessage('Successfully cleared all caches and all available opcode caches.')
+        );
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $statusMessages,
+            'status' => $messageQueue,
         ]);
         return $this->view->render();
     }
-
-    /**
-     * Clear all caches
-     *
-     * @return StatusInterface
-     */
-    protected function clearAllCache(): StatusInterface
-    {
-        $clearCacheService = GeneralUtility::makeInstance(ClearCacheService::class);
-        $clearCacheService->clearAll();
-        $message = new OkStatus();
-        $message->setTitle('Successfully cleared all caches');
-        return $message;
-    }
-
-    /**
-     * Clear PHP opcode cache
-     *
-     * @return StatusInterface
-     */
-    protected function clearOpcodeCache(): StatusInterface
-    {
-        GeneralUtility::makeInstance(OpcodeCacheService::class)->clearAllActive();
-        $message = new OkStatus();
-        $message->setTitle('Successfully cleared all available opcode caches');
-        return $message;
-    }
 }
index d4213e4..58ccc39 100644 (file)
@@ -15,8 +15,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Install\Service\ClearTableService;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Truncate a given table via ClearTableService
@@ -39,13 +40,13 @@ class ClearTablesClear extends AbstractAjaxAction
         }
 
         (new ClearTableService())->clearSelectedTable($this->postValues['table']);
-        $message = new OkStatus();
-        $message->setTitle('Cleared table');
-        $messages[] = $message;
+        $messageQueue = (new FlashMessageQueue('install'))->enqueue(
+            new FlashMessage('Cleared table')
+        );
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $messages,
+            'status' => $messageQueue
         ]);
         return $this->view->render();
     }
index b20028f..4b106a6 100644 (file)
@@ -15,9 +15,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Install\Service\Typo3tempFileService;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Clear Processed Files
@@ -33,26 +33,27 @@ class ClearTypo3tempFiles extends AbstractAjaxAction
      */
     protected function executeAction(): array
     {
+        $messageQueue = new FlashMessageQueue('install');
         $typo3tempFileService = new Typo3tempFileService();
         if ($this->postValues['folder'] === '_processed_') {
             $failedDeletions = $typo3tempFileService->clearProcessedFiles();
             if ($failedDeletions) {
-                $message = new ErrorStatus();
-                $message->setTitle('Failed to delete ' . $failedDeletions . ' processed files. See TYPO3 log (by default typo3temp/var/logs/typo3_*.log)');
+                $messageQueue->enqueue(new FlashMessage(
+                    'Failed to delete ' . $failedDeletions . ' processed files. See TYPO3 log (by default typo3temp/var/logs/typo3_*.log)',
+                    '',
+                    FlashMessage::ERROR
+                ));
             } else {
-                $message = new OkStatus();
-                $message->setTitle('Cleared processed files');
+                $messageQueue->enqueue(new FlashMessage('Cleared processed files'));
             }
         } else {
             $typo3tempFileService->clearAssetsFolder($this->postValues['folder']);
-            $message = new OkStatus();
-            $message->setTitle('Cleared files in "' . $this->postValues['folder'] . '" folder');
+            $messageQueue->enqueue(new FlashMessage('Cleared files in "' . $this->postValues['folder'] . '" folder'));
         }
-        $statusMessages[] = $message;
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $statusMessages,
+            'status' => $messageQueue,
         ]);
         return $this->view->render();
     }
index ea7494d..5974f5f 100644 (file)
@@ -19,7 +19,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\Controller\Exception;
 use TYPO3\CMS\Install\Service\CoreUpdateService;
 use TYPO3\CMS\Install\Service\CoreVersionService;
-use TYPO3\CMS\Install\Status\StatusUtility;
 use TYPO3\CMS\Install\View\JsonView;
 
 /**
@@ -34,11 +33,6 @@ abstract class CoreUpdateAbstract extends AbstractAjaxAction
     protected $coreUpdateService;
 
     /**
-     * @var StatusUtility
-     */
-    protected $statusUtility;
-
-    /**
      * @var CoreVersionService
      */
     protected $coreVersionService;
@@ -46,18 +40,15 @@ abstract class CoreUpdateAbstract extends AbstractAjaxAction
     /**
      * @param JsonView $view
      * @param CoreUpdateService $coreUpdateService
-     * @param StatusUtility $statusUtility
      * @param CoreVersionService $coreVersionService
      */
     public function __construct(
         JsonView $view = null,
         CoreUpdateService $coreUpdateService = null,
-        StatusUtility $statusUtility = null,
         CoreVersionService $coreVersionService = null
     ) {
         parent::__construct($view);
         $this->coreUpdateService = $coreUpdateService ?: GeneralUtility::makeInstance(CoreUpdateService::class);
-        $this->statusUtility = $statusUtility ?: GeneralUtility::makeInstance(StatusUtility::class);
         $this->coreVersionService = $coreVersionService ?: GeneralUtility::makeInstance(CoreVersionService::class);
     }
 
index 63c10b9..77abf6e 100644 (file)
@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\StatusInterface;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 
 /**
  * Check if a younger version is available
@@ -30,34 +30,55 @@ class CoreUpdateIsUpdateAvailable extends CoreUpdateAbstract
      */
     protected function executeAction(): array
     {
-        $status = [];
+        $messageQueue = new FlashMessageQueue('install');
         if ($this->coreVersionService->isInstalledVersionAReleasedVersion()) {
             $isDevelopmentUpdateAvailable = $this->coreVersionService->isYoungerPatchDevelopmentReleaseAvailable();
             $isUpdateAvailable = $this->coreVersionService->isYoungerPatchReleaseAvailable();
             $isUpdateSecurityRelevant = $this->coreVersionService->isUpdateSecurityRelevant();
-
             if (!$isUpdateAvailable && !$isDevelopmentUpdateAvailable) {
-                $status = $this->getMessage('notice', 'No regular update available');
+                $messageQueue->enqueue(new FlashMessage(
+                    '',
+                    'No regular update available',
+                    FlashMessage::NOTICE
+                ));
             } elseif ($isUpdateAvailable) {
                 $newVersion = $this->coreVersionService->getYoungestPatchRelease();
                 if ($isUpdateSecurityRelevant) {
-                    $status = $this->getMessage('warning', 'Update to security relevant released version ' . $newVersion . ' is available!');
+                    $messageQueue->enqueue(new FlashMessage(
+                        '',
+                        'Update to security relevant released version ' . $newVersion . ' is available!',
+                        FlashMessage::WARNING
+                    ));
                     $action = $this->getAction('Update now', 'updateRegular');
                 } else {
-                    $status = $this->getMessage('info', 'Update to regular released version ' . $newVersion . ' is available!');
+                    $messageQueue->enqueue(new FlashMessage(
+                        '',
+                        'Update to regular released version ' . $newVersion . ' is available!',
+                        FlashMessage::INFO
+                    ));
                     $action = $this->getAction('Update now', 'updateRegular');
                 }
             } elseif ($isDevelopmentUpdateAvailable) {
                 $newVersion = $this->coreVersionService->getYoungestPatchDevelopmentRelease();
-                $status = $this->getMessage('info', 'Update to development release ' . $newVersion . ' is available!');
+                $messageQueue->enqueue(new FlashMessage(
+                    '',
+                    'Update to development release ' . $newVersion . ' is available!',
+                    FlashMessage::INFO
+                ));
                 $action = $this->getAction('Update now', 'updateDevelopment');
             }
         } else {
-            $status = $this->getMessage('warning', 'Current version is a development version and can not be updated');
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                'Current version is a development version and can not be updated',
+                FlashMessage::WARNING
+            ));
         }
 
-        $this->view->assign('success', true);
-        $this->view->assign('status', [$status]);
+        $this->view->assignMultiple([
+            'success' => true,
+            'status' => $messageQueue,
+        ]);
         if (isset($action)) {
             $this->view->assign('action', $action);
         }
@@ -65,21 +86,6 @@ class CoreUpdateIsUpdateAvailable extends CoreUpdateAbstract
     }
 
     /**
-     * @param string $severity
-     * @param string $title
-     * @param string $message
-     * @return StatusInterface
-     */
-    protected function getMessage($severity, $title, $message = ''): StatusInterface
-    {
-        /** @var $statusMessage StatusInterface */
-        $statusMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Install\\Status\\' . ucfirst($severity) . 'Status');
-        $statusMessage->setTitle($title);
-        $statusMessage->setMessage($message);
-        return $statusMessage;
-    }
-
-    /**
      * @param string $title
      * @param string $action
      * @return array
index 01fb35e..2cdc92f 100644 (file)
@@ -16,9 +16,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  */
 
 use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Create an administrator from given username and password
@@ -36,22 +36,25 @@ class CreateAdmin extends AbstractAjaxAction
         $username = preg_replace('/\\s/i', '', $this->postValues['userName']);
         $password = $this->postValues['userPassword'];
         $passwordCheck = $this->postValues['userPasswordCheck'];
-        $messages = [];
+        $messages = new FlashMessageQueue('install');
         if (strlen($username) < 1) {
-            $message = new ErrorStatus();
-            $message->setTitle('Administrator user not created');
-            $message->setMessage('No valid username given.');
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                'No valid username given.',
+                'Administrator user not created',
+                FlashMessage::ERROR
+            ));
         } elseif ($password !== $passwordCheck) {
-            $message = new ErrorStatus();
-            $message->setTitle('Administrator user not created');
-            $message->setMessage('Passwords do not match.');
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                'Passwords do not match.',
+                'Administrator user not created',
+                FlashMessage::ERROR
+            ));
         } elseif (strlen($password) < 8) {
-            $message = new ErrorStatus();
-            $message->setTitle('Administrator user not created');
-            $message->setMessage('Password must be at least eight characters long.');
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                'Password must be at least eight characters long.',
+                'Administrator user not created',
+                FlashMessage::ERROR
+            ));
         } else {
             $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
             $userExists = $connectionPool->getConnectionForTable('be_users')
@@ -61,10 +64,11 @@ class CreateAdmin extends AbstractAjaxAction
                     ['username' => $username]
                 );
             if ($userExists) {
-                $message = new ErrorStatus();
-                $message->setTitle('Administrator user not created');
-                $message->setMessage('A user with username "' . $username . '" exists already.');
-                $messages[] = $message;
+                $messages->enqueue(new FlashMessage(
+                    'A user with username "' . $username . '" exists already.',
+                    'Administrator user not created',
+                    FlashMessage::ERROR
+                ));
             } else {
                 $hashedPassword = $this->getHashedPassword($password);
                 $adminUserFields = [
@@ -75,9 +79,10 @@ class CreateAdmin extends AbstractAjaxAction
                     'crdate' => $GLOBALS['EXEC_TIME']
                 ];
                 $connectionPool->getConnectionForTable('be_users')->insert('be_users', $adminUserFields);
-                $message = new OkStatus();
-                $message->setTitle('Administrator created with username "' . $username . '".');
-                $messages[] = $message;
+                $messages->enqueue(new FlashMessage(
+                    '',
+                    'Administrator created with username "' . $username . '".'
+                ));
             }
         }
 
index fedc12a..d7e0b6c 100644 (file)
@@ -18,9 +18,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
 use TYPO3\CMS\Core\Database\Schema\Exception\StatementException;
 use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
 use TYPO3\CMS\Core\Database\Schema\SqlReader;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Execute database analyzer "analyze" / "show" status action
@@ -35,6 +35,7 @@ class DatabaseAnalyzerAnalyze extends AbstractAjaxAction
     protected function executeAction(): array
     {
         $this->loadExtLocalconfDatabaseAndExtTables();
+        $messageQueue = new FlashMessageQueue('install');
 
         $suggestions = [];
         try {
@@ -169,19 +170,21 @@ class DatabaseAnalyzerAnalyze extends AbstractAjaxAction
                 $suggestions[] = $suggestion;
             }
 
-            $message = new OkStatus();
-            $message->setTitle('Analyzed current database');
-            $messages[] = $message;
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                'Analyzed current database'
+            ));
         } catch (StatementException $e) {
-            $message = new ErrorStatus();
-            $message->setTitle('Database analysis failed');
-            $message->setMessage($e->getMessage());
-            $messages[] = $message;
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                'Database analysis failed',
+                FlashMessage::ERROR
+            ));
         }
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $messages,
+            'status' => $messageQueue,
             'suggestions' => $suggestions,
         ]);
         return $this->view->render();
index aa4f5f6..72d73d3 100644 (file)
@@ -17,10 +17,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
 
 use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
 use TYPO3\CMS\Core\Database\Schema\SqlReader;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
-use TYPO3\CMS\Install\Status\WarningStatus;
 
 /**
  * Execute database analyzer "execute" action to apply
@@ -37,11 +36,13 @@ class DatabaseAnalyzerExecute extends AbstractAjaxAction
     {
         $this->loadExtLocalconfDatabaseAndExtTables();
 
-        $messages = [];
+        $messageQueue = new FlashMessageQueue('install');
         if (empty($this->postValues['hashes'])) {
-            $message = new WarningStatus();
-            $message->setTitle('No database changes selected');
-            $messages[] = $message;
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                'No database changes selected',
+                FlashMessage::WARNING
+            ));
         } else {
             $sqlReader = GeneralUtility::makeInstance(SqlReader::class);
             $sqlStatements = $sqlReader->getCreateTableStatementArray($sqlReader->getTablesDefinitionString());
@@ -50,19 +51,21 @@ class DatabaseAnalyzerExecute extends AbstractAjaxAction
             $results = $schemaMigrationService->migrate($sqlStatements, $statementHashesToPerform);
             // Create error flash messages if any
             foreach ($results as $errorMessage) {
-                $message = new ErrorStatus();
-                $message->setTitle('Database update failed');
-                $message->setMessage('Error: ' . $errorMessage);
-                $messages[] = $message;
+                $messageQueue->enqueue(new FlashMessage(
+                    'Error: ' . $errorMessage,
+                    'Database update failed',
+                    FlashMessage::ERROR
+                ));
             }
-            $message = new OkStatus();
-            $message->setTitle('Executed database updates');
-            $messages[] = $message;
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                'Executed database updates'
+            ));
         }
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $messages,
+            'status' => $messageQueue,
         ]);
         return $this->view->render();
     }
index 66a910f..c4813c1 100644 (file)
@@ -17,9 +17,8 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
 
 use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Core\ClassLoadingInformation;
-use TYPO3\CMS\Install\Status\NoticeStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
-use TYPO3\CMS\Install\Status\StatusInterface;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 
 /**
  * Ajax wrapper for dumping autoload.
@@ -33,30 +32,24 @@ class DumpAutoload extends AbstractAjaxAction
      */
     protected function executeAction(): array
     {
-        $statusMessages[] = $this->dumpAutoload();
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $statusMessages,
-        ]);
-        return $this->view->render();
-    }
-
-    /**
-     * Dumps Extension Autoload Information
-     *
-     * @return StatusInterface
-     */
-    protected function dumpAutoload(): StatusInterface
-    {
+        $messageQueue = new FlashMessageQueue('install');
         if (Bootstrap::usesComposerClassLoading()) {
-            $message = new NoticeStatus();
-            $message->setTitle('Skipped generating additional class loading information in composer mode.');
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                'Skipped generating additional class loading information in composer mode.',
+                FlashMessage::NOTICE
+            ));
         } else {
             ClassLoadingInformation::dumpClassLoadingInformation();
-            $message = new OkStatus();
-            $message->setTitle('Successfully dumped class loading information for extensions.');
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                'Successfully dumped class loading information for extensions.'
+            ));
         }
-        return $message;
+        $this->view->assignMultiple([
+            'success' => true,
+            'status' => $messageQueue
+        ]);
+        return $this->view->render();
     }
 }
index 3c0f7b9..bb3c5fe 100644 (file)
@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\StatusUtility;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Install\SystemEnvironment\Check;
 use TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck;
 use TYPO3\CMS\Install\SystemEnvironment\SetupCheck;
@@ -33,15 +33,29 @@ class EnvironmentCheckGetStatus extends AbstractAjaxAction
      */
     protected function executeAction(): array
     {
-        $statusObjects = array_merge(
-            GeneralUtility::makeInstance(Check::class)->getStatus(),
-            GeneralUtility::makeInstance(SetupCheck::class)->getStatus(),
-            GeneralUtility::makeInstance(DatabaseCheck::class)->getStatus()
-        );
+        $messageQueue = new FlashMessageQueue('install');
+        $checkMessages = (new Check())->getStatus();
+        foreach ($checkMessages as $message) {
+            $messageQueue->enqueue($message);
+        }
+        $setupMessages = (new SetupCheck())->getStatus();
+        foreach ($setupMessages as $message) {
+            $messageQueue->enqueue($message);
+        }
+        $databaseMessages = (new DatabaseCheck())->getStatus();
+        foreach ($databaseMessages as $message) {
+            $messageQueue->enqueue($message);
+        }
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => (new StatusUtility())->sortBySeverity($statusObjects),
+            'status' => [
+                'error' => $messageQueue->getAllMessages(FlashMessage::ERROR),
+                'warning' => $messageQueue->getAllMessages(FlashMessage::WARNING),
+                'ok' => $messageQueue->getAllMessages(FlashMessage::OK),
+                'information' => $messageQueue->getAllMessages(FlashMessage::INFO),
+                'notice' => $messageQueue->getAllMessages(FlashMessage::NOTICE),
+            ],
         ]);
         return $this->view->render();
     }
index 139d40d..3dfe0f0 100644 (file)
@@ -15,9 +15,10 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\FolderStructure\DefaultFactory;
-use TYPO3\CMS\Install\Status\StatusUtility;
 
 /**
  * Get folder structure status
@@ -34,23 +35,23 @@ class FolderStructureGetStatus extends AbstractAjaxAction
         $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
         $structureFacade = $folderStructureFactory->getStructure();
 
-        $statusObjects = $structureFacade->getStatus();
-        $statusUtility = GeneralUtility::makeInstance(StatusUtility::class);
-
-        $errorStatus = array_merge(
-            $statusUtility->filterBySeverity($statusObjects, 'error'),
-            $statusUtility->filterBySeverity($statusObjects, 'warning')
-        );
-        $okStatus = array_merge(
-            $statusUtility->filterBySeverity($statusObjects, 'notice'),
-            $statusUtility->filterBySeverity($statusObjects, 'information'),
-            $statusUtility->filterBySeverity($statusObjects, 'ok')
-        );
+        $structureMessages = $structureFacade->getStatus();
+        $errorQueue = new FlashMessageQueue('install');
+        $okQueue = new FlashMessageQueue('install');
+        foreach ($structureMessages as $message) {
+            if ($message->getSeverity() === FlashMessage::ERROR
+                || $message->getSeverity() === FlashMessage::WARNING
+            ) {
+                $errorQueue->enqueue($message);
+            } else {
+                $okQueue->enqueue($message);
+            }
+        }
 
         $this->view->assignMultiple([
             'success' => true,
-            'errorStatus' => $errorStatus,
-            'okStatus' => $okStatus,
+            'errorStatus' => $errorQueue,
+            'okStatus' => $okQueue,
         ]);
         return $this->view->render();
     }
index de65f81..fc03ef3 100644 (file)
@@ -16,13 +16,11 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  */
 
 use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\InfoStatus;
-use TYPO3\CMS\Install\Status\StatusInterface;
-use TYPO3\CMS\Install\Status\WarningStatus;
 
 /**
  * Execute an image test.
@@ -163,11 +161,14 @@ class ImageProcessing extends AbstractAjaxAction
             ];
         }
         if (!GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $inputFormat)) {
-            $message = new WarningStatus();
-            $message->setTitle('Skipped test');
-            $message->setMessage('Handling format ' . $inputFormat . ' must be enabled in TYPO3_CONF_VARS[\'GFX\'][\'imagefile_ext\']');
             return [
-                'status' => [ $message ]
+                'status' => [
+                    new FlashMessage(
+                        'Handling format ' . $inputFormat . ' must be enabled in TYPO3_CONF_VARS[\'GFX\'][\'imagefile_ext\']',
+                        'Skipped test',
+                        FlashMessage::WARNING
+                    )
+                ]
             ];
         }
         $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
@@ -206,7 +207,7 @@ class ImageProcessing extends AbstractAjaxAction
         $imageProcessor = $this->initializeImageProcessor();
         $imageProcessor->imageMagickConvert_forceFileNameBody = StringUtility::getUniqueId('write-gif');
         $imResult = $imageProcessor->imageMagickConvert($inputFile, 'gif', '300', '', '', '', [], true);
-        $messages = [];
+        $messages = new FlashMessageQueue('install');
         if ($imResult !== null && is_file($imResult[3])) {
             if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress']) {
                 clearstatcache();
@@ -214,20 +215,21 @@ class ImageProcessing extends AbstractAjaxAction
                 $methodUsed = GraphicalFunctions::gifCompress($imResult[3], '');
                 clearstatcache();
                 $compressedSize = GeneralUtility::formatSize(filesize($imResult[3]));
-                $message = new InfoStatus();
-                $message->setTitle('Compressed gif');
-                $message->setMessage(
+                $messages->enqueue(new FlashMessage(
                     'Method used by compress: ' . $methodUsed . LF
-                    . ' Previous filesize: ' . $previousSize . '. Current filesize:' . $compressedSize
-                );
-                $messages[] = $message;
+                        . ' Previous filesize: ' . $previousSize . '. Current filesize:' . $compressedSize,
+                    'Compressed gif',
+                    FlashMessage::INFO
+                ));
             } else {
-                $message = new InfoStatus();
-                $message->setTitle('Gif compression not enabled by [GFX][gif_compress]');
-                $messages[] = $message;
+                $messages->enqueue(new FlashMessage(
+                    '',
+                    'Gif compression not enabled by [GFX][gif_compress]',
+                    FlashMessage::INFO
+                ));
             }
             $result = [
-                'status' => $message,
+                'status' => $messages,
                 'fileExists' => true,
                 'outputFile' => $imResult[3],
                 'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Write-gif.gif',
@@ -666,19 +668,17 @@ class ImageProcessing extends AbstractAjaxAction
     /**
      * Create a 'image generation failed' message
      *
-     * @return StatusInterface
+     * @return FlashMessage
      */
-    protected function imageGenerationFailedMessage(): StatusInterface
+    protected function imageGenerationFailedMessage(): FlashMessage
     {
-        /** @var StatusInterface $message */
-        $message = GeneralUtility::makeInstance(ErrorStatus::class);
-        $message->setTitle('Image generation failed');
-        $message->setMessage(
+        return new FlashMessage(
             'ImageMagick / GraphicsMagick handling is enabled, but the execute'
-            . ' command returned an error. Please check your settings, especially'
-            . ' [\'GFX\'][\'processor_path\'] and [\'GFX\'][\'processor_path_lzw\'] and ensure Ghostscript is installed on your server.'
+                . ' command returned an error. Please check your settings, especially'
+                . ' [\'GFX\'][\'processor_path\'] and [\'GFX\'][\'processor_path_lzw\'] and ensure Ghostscript is installed on your server.',
+            'Image generation failed',
+            FlashMessage::ERROR
         );
-        return $message;
     }
 
     /**
@@ -696,14 +696,15 @@ class ImageProcessing extends AbstractAjaxAction
     /**
      * Create a 'imageMagick disabled' message
      *
-     * @return StatusInterface
+     * @return FlashMessage
      */
-    protected function imageMagickDisabledMessage(): StatusInterface
+    protected function imageMagickDisabledMessage(): FlashMessage
     {
-        $message = new ErrorStatus();
-        $message->setTitle('Tests not executed');
-        $message->setMessage('ImageMagick / GraphicsMagick handling is disabled or not configured correctly.');
-        return $message;
+        return new FlashMessage(
+            'ImageMagick / GraphicsMagick handling is disabled or not configured correctly.',
+            'Tests not executed',
+            FlashMessage::ERROR
+        );
     }
 
     /**
index 952f802..862c9a4 100644 (file)
@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Install\Service\LocalConfigurationValueService;
-use TYPO3\CMS\Install\Status\WarningStatus;
 
 /**
  * Write values to LocalConfiguration
@@ -38,17 +38,19 @@ class LocalConfigurationWrite extends AbstractAjaxAction
         }
 
         $localConfigurationValueService = new LocalConfigurationValueService();
-        $messages = $localConfigurationValueService->updateLocalConfigurationValues($this->postValues['configurationValues']);
+        $messageQueue = $localConfigurationValueService->updateLocalConfigurationValues($this->postValues['configurationValues']);
 
-        if (empty($messages)) {
-            $message = new WarningStatus();
-            $message->setTitle('No values changed');
-            $messages[] = $message;
+        if (empty($messageQueue)) {
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                'No values changed',
+                FlashMessage::WARNING
+            ));
         }
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $messages,
+            'status' => $messageQueue,
         ]);
         return $this->view->render();
     }
index 3a4a43c..0a4d5da 100644 (file)
@@ -16,9 +16,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  */
 
 use TYPO3\CMS\Core\Mail\MailMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Send a test mail
@@ -32,13 +32,14 @@ class MailTest extends AbstractAjaxAction
      */
     protected function executeAction(): array
     {
-        $messages = [];
+        $messages = new FlashMessageQueue('install');
         $recipient = $this->postValues['email'];
         if (empty($recipient) || !GeneralUtility::validEmail($recipient)) {
-            $message = new ErrorStatus();
-            $message->setTitle('Mail not sent');
-            $message->setMessage('Given address is not a valid email address.');
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                'Given address is not a valid email address.',
+                'Mail not sent',
+                FlashMessage::ERROR
+            ));
         } else {
             $mailMessage = GeneralUtility::makeInstance(MailMessage::class);
             $mailMessage
@@ -48,10 +49,10 @@ class MailTest extends AbstractAjaxAction
                 ->setBody('<html><body>html test content</body></html>', 'text/html')
                 ->addPart('TEST CONTENT')
                 ->send();
-            $message = new OkStatus();
-            $message->setTitle('Test mail sent');
-            $message->setMessage('Recipient: ' . $recipient);
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                'Recipient: ' . $recipient,
+                'Test mail sent'
+            ));
         }
 
         $this->view->assignMultiple([
index 590af01..45fb4fb 100644 (file)
@@ -16,9 +16,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  */
 
 use TYPO3\CMS\Core\Configuration\ConfigurationManager;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Install\Configuration\FeatureManager;
-use TYPO3\CMS\Install\Status\InfoStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Activate a LocalConfiguration preset
@@ -32,24 +32,27 @@ class PresetActivate extends AbstractAjaxAction
      */
     protected function executeAction(): array
     {
-        $messages = [];
+        $messages = new FlashMessageQueue('install');
         $configurationManager = new ConfigurationManager();
         $featureManager = new FeatureManager();
         $configurationValues = $featureManager->getConfigurationForSelectedFeaturePresets($this->postValues['values']);
         if (!empty($configurationValues)) {
             $configurationManager->setLocalConfigurationValuesByPathValuePairs($configurationValues);
-            $message = new OkStatus();
-            $message->setTitle('Configuration written');
             $messageBody = [];
             foreach ($configurationValues as $configurationKey => $configurationValue) {
                 $messageBody[] = '\'' . $configurationKey . '\' => \'' . $configurationValue . '\'';
             }
-            $message->setMessage(implode('<br>', $messageBody));
+            $messages->enqueue(new FlashMessage(
+                implode('<br>', $messageBody),
+                'Configuration written'
+            ));
         } else {
-            $message = new InfoStatus();
-            $message->setTitle('No configuration change selected');
+            $messages->enqueue(new FlashMessage(
+                '',
+                'No configuration change selected',
+                FlashMessage::INFO
+            ));
         }
-        $messages[] = $message;
 
         $this->view->assignMultiple([
             'success' => true,
index 1077977..c1d122b 100644 (file)
@@ -16,9 +16,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  */
 
 use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\OkStatus;
-use TYPO3\CMS\Install\Status\StatusInterface;
 
 /**
  * Ajax wrapper to reset backend user preferences
@@ -33,30 +33,22 @@ class ResetBackendUserUc extends AbstractAjaxAction
      */
     protected function executeAction(): array
     {
-        $statusMessages[] = $this->resetBackendUserUc();
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $statusMessages,
-        ]);
-        return $this->view->render();
-    }
-
-    /**
-     * Reset uc field of all be_users to empty string
-     *
-     * @return StatusInterface
-     * @throws \InvalidArgumentException
-     */
-    protected function resetBackendUserUc(): StatusInterface
-    {
         GeneralUtility::makeInstance(ConnectionPool::class)
             ->getQueryBuilderForTable('be_users')
             ->update('be_users')
             ->set('uc', '')
             ->execute();
-        $message = new OkStatus();
-        $message->setTitle('Reset all backend users preferences');
-        return $message;
+
+        $messageQueue = new FlashMessageQueue('install');
+        $messageQueue->enqueue(new FlashMessage(
+            '',
+            'Reset all backend users preferences'
+        ));
+
+        $this->view->assignMultiple([
+            'success' => true,
+            'status' => $messageQueue
+        ]);
+        return $this->view->render();
     }
 }
index bca3f4d..828d8c0 100644 (file)
@@ -15,9 +15,10 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\Service\LoadTcaService;
-use TYPO3\CMS\Install\Status\NoticeStatus;
 
 /**
  * Check ext_tables.php files of loaded extensions for TCA changes.
@@ -37,18 +38,19 @@ class TcaExtTablesCheck extends AbstractAjaxAction
      */
     protected function executeAction(): array
     {
-        $statusMessages = [];
+        $messageQueue = new FlashMessageQueue('install');
         $tcaMessages = $this->checkTcaChangesInExtTables();
-
         foreach ($tcaMessages as $tcaMessage) {
-            $message = new NoticeStatus();
-            $message->setTitle($tcaMessage);
-            $statusMessages[] = $message;
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                $tcaMessage,
+                FlashMessage::NOTICE
+            ));
         }
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $statusMessages,
+            'status' => $messageQueue,
         ]);
         return $this->view->render();
     }
index fc83b5c..ab6b907 100644 (file)
@@ -15,10 +15,11 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Migrations\TcaMigration;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\Service\LoadTcaService;
-use TYPO3\CMS\Install\Status\NoticeStatus;
 
 /**
  * Checks whether the current TCA needs migrations and displays applied migrations.
@@ -32,18 +33,19 @@ class TcaMigrationsCheck extends AbstractAjaxAction
      */
     protected function executeAction(): array
     {
-        $statusMessages = [];
+        $messageQueue = new FlashMessageQueue('install');
         $tcaMessages = $this->checkTcaMigrations();
-
         foreach ($tcaMessages as $tcaMessage) {
-            $message = new NoticeStatus();
-            $message->setMessage($tcaMessage);
-            $statusMessages[] = $message;
+            $messageQueue->enqueue(new FlashMessage(
+                '',
+                $tcaMessage,
+                FlashMessage::NOTICE
+            ));
         }
 
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $statusMessages,
+            'status' => $messageQueue,
         ]);
         return $this->view->render();
     }
index c30c2d8..6a701e5 100644 (file)
@@ -15,9 +15,10 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
 
 /**
  * Uninstall Extensions
@@ -40,6 +41,7 @@ class UninstallExtension extends AbstractAjaxAction
     protected function executeAction(): array
     {
         $getVars = GeneralUtility::_GET('install');
+        $messageQueue = new FlashMessageQueue('install');
         if (isset($getVars['uninstallExtension']) && isset($getVars['uninstallExtension']['extensions'])) {
             $extensionsToUninstall = GeneralUtility::trimExplode(',', $getVars['uninstallExtension']['extensions']);
             foreach ($extensionsToUninstall as $extension) {
@@ -47,11 +49,14 @@ class UninstallExtension extends AbstractAjaxAction
                     try {
                         ExtensionManagementUtility::unloadExtension($extension);
                     } catch (\Exception $e) {
-                        $message = new ErrorStatus();
-                        $message->setMessage($e->getMessage());
+                        $messageQueue->enqueue(new FlashMessage(
+                            $e->getMessage(),
+                            '',
+                            FlashMessage::ERROR
+                        ));
                         return [
                             'success' => true,
-                            'status' => [ $message ],
+                            'status' => $messageQueue
                         ];
                     }
                 }
index 6d1f18b..2f2b39a 100644 (file)
@@ -15,8 +15,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Set default connection MySQL database charset to utf8.
@@ -33,10 +34,11 @@ class UpgradeWizardsBlockingDatabaseCharsetFix extends AbstractAjaxAction
         $upgradeWizardsService = new UpgradeWizardsService();
         $upgradeWizardsService->setDatabaseCharsetUtf8();
 
-        $messages = [];
-        $message = new OkStatus();
-        $message->setTitle('Default connection database has been set to utf8');
-        $messages[] = $message;
+        $messages = new FlashMessageQueue('install');
+        $messages->enqueue(new FlashMessage(
+            '',
+            'Default connection database has been set to utf8'
+        ));
 
         $this->view->assignMultiple([
             'success' => true,
index 3fba43e..08dbae0 100644 (file)
@@ -15,8 +15,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Execute "Add required db tables and fields" blocking upgrade wizard
@@ -37,10 +38,11 @@ class UpgradeWizardsBlockingDatabaseExecute extends AbstractAjaxAction
         $upgradeWizardsService = new UpgradeWizardsService();
         $upgradeWizardsService->addMissingTablesAndFields();
 
-        $messages = [];
-        $message = new OkStatus();
-        $message->setTitle('Added missing database fields and tables');
-        $messages[] = $message;
+        $messages = new FlashMessageQueue('install');
+        $messages->enqueue(new FlashMessage(
+            '',
+            'Added missing database fields and tables'
+        ));
 
         $this->view->assignMultiple([
             'success' => true,
index 50ff5b8..531d206 100644 (file)
@@ -15,8 +15,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Get a list of wizards and row updaters marked as "done" in registry
@@ -36,11 +37,12 @@ class UpgradeWizardsDoneUpgrades extends AbstractAjaxAction
         $wizardsDone = $upgradeWizardsService->listOfWizardsDoneInRegistry();
         $rowUpdatersDone = $upgradeWizardsService->listOfRowUpdatersDoneInRegistry();
 
-        $messages = [];
+        $messages = new FlashMessageQueue('install');
         if (empty($wizardsDone) && empty($rowUpdatersDone)) {
-            $message = new OkStatus();
-            $message->setTitle('No wizards are marked as done');
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                '',
+                'No wizards are marked as done'
+            ));
         }
 
         $this->view->assignMultiple([
index 3057049..dd2626d 100644 (file)
@@ -37,10 +37,9 @@ class UpgradeWizardsInput extends AbstractAjaxAction
         $identifier = $this->postValues['identifier'];
         $result = $upgradeWizardsService->getWizardUserInput($identifier);
 
-        $messages = [];
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $messages,
+            'status' => [],
             'userInput' => $result,
         ]);
         return $this->view->render();
index 16d678d..307b14a 100644 (file)
@@ -35,10 +35,9 @@ class UpgradeWizardsList extends AbstractAjaxAction
         $upgradeWizardsService = new UpgradeWizardsService();
         $wizards = $upgradeWizardsService->getUpgradeWizardsList();
 
-        $messages = [];
         $this->view->assignMultiple([
             'success' => true,
-            'status' => $messages,
+            'status' => [],
             'wizards' => $wizards,
         ]);
         return $this->view->render();
index 455fb9d..601c7b0 100644 (file)
@@ -15,9 +15,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Mark a wizard as undone in registry. Can be either a
@@ -38,15 +38,18 @@ class UpgradeWizardsMarkUndone extends AbstractAjaxAction
         $upgradeWizardsService = new UpgradeWizardsService();
         $result = $upgradeWizardsService->markWizardUndoneInRegistry($wizardToBeMarkedAsUndoneIdentifier);
 
-        $messages = [];
+        $messages = new FlashMessageQueue('install');
         if ($result) {
-            $message = new OkStatus();
-            $message->setTitle('Wizard has been marked undone');
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                '',
+                'Wizard has been marked undone'
+            ));
         } else {
-            $message = new ErrorStatus();
-            $message->setTitle('Wizard has not been marked undone');
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                '',
+                'Wizard has not been marked undone',
+                FlashMessage::ERROR
+            ));
         }
 
         $this->view->assignMultiple([
index cc77d56..3c0317b 100644 (file)
@@ -15,8 +15,9 @@ namespace TYPO3\CMS\Install\Controller\Action\Ajax;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Perform "silent" wizard upgrades on first opening of the card
@@ -37,11 +38,12 @@ class UpgradeWizardsSilentUpgrades extends AbstractAjaxAction
         $upgradeWizardsService = new UpgradeWizardsService();
         $statements = $upgradeWizardsService->silentCacheFrameworkTableSchemaMigration();
 
-        $messages = [];
+        $messages = new FlashMessageQueue('install');
         if (!empty($statements)) {
-            $message = new OkStatus();
-            $message->setTitle('Created some database cache tables.');
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                '',
+                'Created some database cache tables.'
+            ));
         }
 
         $this->view->assignMultiple([
index 3752f68..bf93c63 100644 (file)
@@ -14,11 +14,7 @@ namespace TYPO3\CMS\Install\Controller\Action\Common;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\Controller\Action;
-use TYPO3\CMS\Install\Status\StatusUtility;
-use TYPO3\CMS\Install\SystemEnvironment\Check;
-use TYPO3\CMS\Install\SystemEnvironment\SetupCheck;
 
 /**
  * Welcome page
@@ -32,15 +28,6 @@ class InstallToolDisabledAction extends Action\AbstractAction
      */
     protected function executeAction()
     {
-        $statusObjects = array_merge(
-            GeneralUtility::makeInstance(Check::class)->getStatus(),
-            GeneralUtility::makeInstance(SetupCheck::class)->getStatus()
-        );
-        /** @var \TYPO3\CMS\Install\Status\StatusUtility $statusUtility */
-        $statusUtility = GeneralUtility::makeInstance(StatusUtility::class);
-        $alerts = $statusUtility->filterBySeverity($statusObjects, 'alert');
-        $this->view->assign('alerts', $alerts);
-
         return $this->view->render();
     }
 }
index 473c6bd..b979908 100644 (file)
@@ -19,8 +19,8 @@ use Doctrine\DBAL\DriverManager;
 use TYPO3\CMS\Core\Configuration\ConfigurationManager;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
 
 /**
  * Database connect step:
@@ -34,11 +34,11 @@ class DatabaseConnect extends AbstractStepAction
      * Execute database step:
      * - Set database connect credentials in LocalConfiguration
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
     public function execute()
     {
-        $result = [];
+        $messages = [];
         $postValues = $this->postValues['values'];
         $defaultConnectionSettings = [];
 
@@ -55,10 +55,11 @@ class DatabaseConnect extends AbstractStepAction
                 if (in_array($postValues['driver'], $validDrivers, true)) {
                     $defaultConnectionSettings['driver'] = $postValues['driver'];
                 } else {
-                    $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $errorStatus->setTitle('Database driver unknown');
-                    $errorStatus->setMessage('Given driver must be one of ' . implode(', ', $validDrivers));
-                    $result[] = $errorStatus;
+                    $messages[] = new FlashMessage(
+                        'Given driver must be one of ' . implode(', ', $validDrivers),
+                        'Database driver unknown',
+                        FlashMessage::ERROR
+                    );
                 }
             }
             if (isset($postValues['username'])) {
@@ -66,10 +67,11 @@ class DatabaseConnect extends AbstractStepAction
                 if (strlen($value) <= 50) {
                     $defaultConnectionSettings['user'] = $value;
                 } else {
-                    $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $errorStatus->setTitle('Database username not valid');
-                    $errorStatus->setMessage('Given username must be shorter than fifty characters.');
-                    $result[] = $errorStatus;
+                    $messages[] = new FlashMessage(
+                        'Given username must be shorter than fifty characters.',
+                        'Database username not valid',
+                        FlashMessage::ERROR
+                    );
                 }
             }
             if (isset($postValues['password'])) {
@@ -77,10 +79,11 @@ class DatabaseConnect extends AbstractStepAction
                 if (strlen($value) <= 50) {
                     $defaultConnectionSettings['password'] = $value;
                 } else {
-                    $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $errorStatus->setTitle('Database password not valid');
-                    $errorStatus->setMessage('Given password must be shorter than fifty characters.');
-                    $result[] = $errorStatus;
+                    $messages[] = new FlashMessage(
+                        'Given password must be shorter than fifty characters.',
+                        'Database password not valid',
+                        FlashMessage::ERROR
+                    );
                 }
             }
             if (isset($postValues['host'])) {
@@ -88,10 +91,11 @@ class DatabaseConnect extends AbstractStepAction
                 if (preg_match('/^[a-zA-Z0-9_\\.-]+(:.+)?$/', $value) && strlen($value) <= 255) {
                     $defaultConnectionSettings['host'] = $value;
                 } else {
-                    $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $errorStatus->setTitle('Database host not valid');
-                    $errorStatus->setMessage('Given host is not alphanumeric (a-z, A-Z, 0-9 or _-.:) or longer than 255 characters.');
-                    $result[] = $errorStatus;
+                    $messages[] = new FlashMessage(
+                        'Given host is not alphanumeric (a-z, A-Z, 0-9 or _-.:) or longer than 255 characters.',
+                        'Database host not valid',
+                        FlashMessage::ERROR
+                    );
                 }
             }
             if (isset($postValues['port']) && $postValues['host'] !== 'localhost') {
@@ -99,20 +103,22 @@ class DatabaseConnect extends AbstractStepAction
                 if (preg_match('/^[0-9]+(:.+)?$/', $value) && $value > 0 && $value <= 65535) {
                     $defaultConnectionSettings['port'] = (int)$value;
                 } else {
-                    $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $errorStatus->setTitle('Database port not valid');
-                    $errorStatus->setMessage('Given port is not numeric or within range 1 to 65535.');
-                    $result[] = $errorStatus;
+                    $messages[] = new FlashMessage(
+                        'Given port is not numeric or within range 1 to 65535.',
+                        'Database port not valid',
+                        FlashMessage::ERROR
+                    );
                 }
             }
             if (isset($postValues['socket']) && $postValues['socket'] !== '') {
                 if (@file_exists($postValues['socket'])) {
                     $defaultConnectionSettings['unix_socket'] = $postValues['socket'];
                 } else {
-                    $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $errorStatus->setTitle('Socket does not exist');
-                    $errorStatus->setMessage('Given socket location does not exist on server.');
-                    $result[] = $errorStatus;
+                    $messages[] = new FlashMessage(
+                        'Given socket location does not exist on server.',
+                        'Socket does not exist',
+                        FlashMessage::ERROR
+                    );
                 }
             }
             if (isset($postValues['database'])) {
@@ -120,10 +126,11 @@ class DatabaseConnect extends AbstractStepAction
                 if (strlen($value) <= 50) {
                     $defaultConnectionSettings['dbname'] = $value;
                 } else {
-                    $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $errorStatus->setTitle('Database name not valid');
-                    $errorStatus->setMessage('Given database name must be shorter than fifty characters.');
-                    $result[] = $errorStatus;
+                    $messages[] = new FlashMessage(
+                        'Given database name must be shorter than fifty characters.',
+                        'Database name not valid',
+                        FlashMessage::ERROR
+                    );
                 }
             }
         }
@@ -136,10 +143,11 @@ class DatabaseConnect extends AbstractStepAction
                 $connectionParams['charset'] = 'utf-8';
                 DriverManager::getConnection($connectionParams)->ping();
             } catch (DBALException $e) {
-                $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-                $errorStatus->setTitle('Database connect not successful');
-                $errorStatus->setMessage('Connecting to the database with given settings failed: ' . $e->getMessage());
-                $result[] = $errorStatus;
+                $messages[] = new FlashMessage(
+                    'Connecting to the database with given settings failed: ' . $e->getMessage(),
+                    'Database connect not successful',
+                    FlashMessage::ERROR
+                );
             }
             $localConfigurationPathValuePairs = [];
             foreach ($defaultConnectionSettings as $settingsName => $value) {
@@ -152,7 +160,7 @@ class DatabaseConnect extends AbstractStepAction
             $configurationManager->setLocalConfigurationValuesByPathValuePairs($localConfigurationPathValuePairs);
         }
 
-        return $result;
+        return $messages;
     }
 
     /**
index 7099ce7..cc25a68 100644 (file)
@@ -20,8 +20,8 @@ use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Schema\Exception\StatementException;
 use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
 use TYPO3\CMS\Core\Database\Schema\SqlReader;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
 
 /**
  * Populate base tables, insert admin user, set install tool password
@@ -31,11 +31,11 @@ class DatabaseData extends AbstractStepAction
     /**
      * Import tables and data, create admin user, create install tool password
      *
-     * @return \TYPO3\CMS\Install\Status\StatusInterface[]
+     * @return FlashMessage[]
      */
     public function execute()
     {
-        $result = [];
+        $messages = [];
 
         /** @var ConfigurationManager $configurationManager */
         $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
@@ -47,14 +47,13 @@ class DatabaseData extends AbstractStepAction
         // Check password and return early if not good enough
         $password = $postValues['password'];
         if (strlen($password) < 8) {
-            $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-            $errorStatus->setTitle('Administrator password not secure enough!');
-            $errorStatus->setMessage(
-                'You are setting an important password here! It gives an attacker full control over your instance if cracked.' .
-                ' It should be strong (include lower and upper case characters, special characters and numbers) and must be at least eight characters long.'
+            $messages[] = new FlashMessage(
+                'You are setting an important password here! It gives an attacker full control over your instance if cracked.'
+                    . ' It should be strong (include lower and upper case characters, special characters and numbers) and must be at least eight characters long.',
+                'Administrator password not secure enough!',
+                FlashMessage::ERROR
             );
-            $result[] = $errorStatus;
-            return $result;
+            return $messages;
         }
 
         // Set site name
@@ -63,19 +62,17 @@ class DatabaseData extends AbstractStepAction
         }
 
         try {
-            $result = $this->importDatabaseData();
-            if (!empty($result)) {
-                return $result;
+            $messages = $this->importDatabaseData();
+            if (!empty($messages)) {
+                return $messages;
             }
         } catch (StatementException $exception) {
-            $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-            $errorStatus->setTitle('Import of database data could not be performed');
-            $errorStatus->setMessage(
-                'Error detected in SQL statement:' . LF .
-                $exception->getMessage()
+            $messages[] = new FlashMessage(
+                'Error detected in SQL statement:' . LF . $exception->getMessage(),
+                'Import of database data could not be performed',
+                FlashMessage::ERROR
             );
-            $result[] = $errorStatus;
-            return $result;
+            return $messages;
         }
 
         // Insert admin user
@@ -91,14 +88,13 @@ class DatabaseData extends AbstractStepAction
         try {
             $databaseConnection->insert('be_users', $adminUserFields);
         } catch (DBALException $exception) {
-            $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-            $errorStatus->setTitle('Administrator account not created!');
-            $errorStatus->setMessage(
-                'The administrator account could not be created. The following error occurred:' . LF .
-                $exception->getPrevious()->getMessage()
+            $messages[] = new FlashMessage(
+                'The administrator account could not be created. The following error occurred:' . LF
+                    . $exception->getPrevious()->getMessage(),
+                'Administrator account not created!',
+                FlashMessage::ERROR
             );
-            $result[] = $errorStatus;
-            return $result;
+            return $messages;
         }
 
         // Set password as install tool password
@@ -107,7 +103,7 @@ class DatabaseData extends AbstractStepAction
         // Mark the initial import as done
         $this->markImportDatabaseDone();
 
-        return $result;
+        return $messages;
     }
 
     /**
@@ -143,7 +139,7 @@ class DatabaseData extends AbstractStepAction
     /**
      * Create tables and import static rows
      *
-     * @return \TYPO3\CMS\Install\Status\StatusInterface[]
+     * @return FlashMessage[]
      * @throws \Doctrine\DBAL\DBALException
      * @throws \Doctrine\DBAL\Schema\SchemaException
      * @throws \InvalidArgumentException
@@ -181,15 +177,11 @@ class DatabaseData extends AbstractStepAction
                 continue;
             }
 
-            $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-            $errorStatus->setTitle('Database query failed!');
-            $errorStatus->setMessage(
-                'Query:' . LF .
-                ' ' . $statement . LF .
-                'Error:' . LF .
-                ' ' . $message
+            $message = new FlashMessage(
+                'Query:' . LF . ' ' . $statement . LF . 'Error:' . LF . ' ' . $message,
+                'Database query failed!',
+                FlashMessage::ERROR
             );
-            $message = $errorStatus;
         }
 
         return array_values($results);
index 2f81335..eee5ae6 100644 (file)
@@ -18,9 +18,8 @@ use Doctrine\DBAL\DBALException;
 use Doctrine\DBAL\DriverManager;
 use TYPO3\CMS\Core\Configuration\ConfigurationManager;
 use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Database select step.
@@ -31,26 +30,29 @@ class DatabaseSelect extends AbstractStepAction
     /**
      * Create database if needed, save selected db name in configuration
      *
-     * @return \TYPO3\CMS\Install\Status\StatusInterface[]
+     * @return FlashMessage[]
      */
     public function execute()
     {
         $postValues = $this->postValues['values'];
         if ($postValues['type'] === 'new') {
             $status = $this->createNewDatabase($postValues['new']);
-            if ($status instanceof ErrorStatus) {
+            if ($status->getSeverity() === FlashMessage::ERROR) {
                 return [ $status ];
             }
         } elseif ($postValues['type'] === 'existing' && !empty($postValues['existing'])) {
             $status = $this->checkExistingDatabase($postValues['existing']);
-            if ($status instanceof ErrorStatus) {
+            if ($status->getSeverity() === FlashMessage::ERROR) {
                 return [ $status ];
             }
         } else {
-            $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-            $errorStatus->setTitle('No Database selected');
-            $errorStatus->setMessage('You must select a database.');
-            return [ $errorStatus ];
+            return [
+                new FlashMessage(
+                    'You must select a database.',
+                    'No Database selected',
+                    FlashMessage::ERROR
+                ),
+            ];
         }
         return [];
     }
@@ -195,20 +197,18 @@ class DatabaseSelect extends AbstractStepAction
      *
      * @param string $dbName name of database
      *
-     * @return \TYPO3\CMS\Install\Status\StatusInterface
+     * @return FlashMessage
      */
     protected function createNewDatabase($dbName)
     {
         if (!$this->isValidDatabaseName($dbName)) {
-            $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-            $errorStatus->setTitle('Database name not valid');
-            $errorStatus->setMessage(
-                'Given database name must be shorter than fifty characters' .
-                ' and consist solely of basic latin letters (a-z), digits (0-9), dollar signs ($)' .
-                ' and underscores (_).'
+            return new FlashMessage(
+                'Given database name must be shorter than fifty characters'
+                    . ' and consist solely of basic latin letters (a-z), digits (0-9), dollar signs ($)'
+                    . ' and underscores (_).',
+                'Database name not valid',
+                FlashMessage::ERROR
             );
-
-            return $errorStatus;
         }
 
         try {
@@ -219,18 +219,19 @@ class DatabaseSelect extends AbstractStepAction
             GeneralUtility::makeInstance(ConfigurationManager::class)
                 ->setLocalConfigurationValueByPath('DB/Connections/Default/dbname', $dbName);
         } catch (DBALException $e) {
-            $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-            $errorStatus->setTitle('Unable to create database');
-            $errorStatus->setMessage(
-                'Database with name "' . $dbName . '" could not be created.' .
-                ' Either your database name contains a reserved keyword or your database' .
-                ' user does not have sufficient permissions to create it or the database already exists.' .
-                ' Please choose an existing (empty) database, choose another name or contact administration.'
+            return new FlashMessage(
+                'Database with name "' . $dbName . '" could not be created.'
+                    . ' Either your database name contains a reserved keyword or your database'
+                    . ' user does not have sufficient permissions to create it or the database already exists.'
+                    . ' Please choose an existing (empty) database, choose another name or contact administration.',
+                'Unable to create database',
+                FlashMessage::ERROR
             );
-            return $errorStatus;
         }
-
-        return GeneralUtility::makeInstance(OkStatus::class);
+        return new FlashMessage(
+            '',
+            'Database created'
+        );
     }
 
     /**
@@ -239,11 +240,11 @@ class DatabaseSelect extends AbstractStepAction
      * persisted to the local configuration if the database is empty.
      *
      * @param string $dbName name of the database
-     * @return \TYPO3\CMS\Install\Status\StatusInterface
+     * @return FlashMessage
      */
     protected function checkExistingDatabase($dbName)
     {
-        $result = GeneralUtility::makeInstance(OkStatus::class);
+        $result = new FlashMessage('');
         $localConfigurationPathValuePairs = [];
         $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
         $isInitialInstallation = $configurationManager
@@ -255,42 +256,39 @@ class DatabaseSelect extends AbstractStepAction
                 ->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME);
 
             if ($isInitialInstallation && !empty($connection->getSchemaManager()->listTableNames())) {
-                $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-                $errorStatus->setTitle('Selected database is not empty!');
-                $errorStatus->setMessage(
+                $result = new FlashMessage(
                     sprintf('Cannot use database "%s"', $dbName)
-                    . ', because it already contains tables. '
-                    . 'Please select a different database or choose to create one!'
+                        . ', because it already contains tables. '
+                        . 'Please select a different database or choose to create one!',
+                    'Selected database is not empty!',
+                    FlashMessage::ERROR
                 );
-                $result = $errorStatus;
             }
         } catch (\Exception $e) {
-            $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-            $errorStatus->setTitle('Could not connect to selected database!');
-            $errorStatus->setMessage(
+            $result = new FlashMessage(
                 sprintf('Could not connect to database "%s"', $dbName)
-                . '! Make sure it really exists and your database user has the permissions to select it!'
+                    . '! Make sure it really exists and your database user has the permissions to select it!',
+                'Could not connect to selected database!',
+                FlashMessage::ERROR
             );
-            $result = $errorStatus;
         }
 
-        if ($result instanceof OkStatus) {
+        if ($result->getSeverity() === FlashMessage::OK) {
             $localConfigurationPathValuePairs['DB/Connections/Default/dbname'] = $dbName;
         }
 
         // check if database charset is utf-8 - also allow utf8mb4
         $defaultDatabaseCharset = $this->getDefaultDatabaseCharset($dbName);
         if (substr($defaultDatabaseCharset, 0, 4) !== 'utf8') {
-            $errorStatus = GeneralUtility::makeInstance(ErrorStatus::class);
-            $errorStatus->setTitle('Invalid Charset');
-            $errorStatus->setMessage(
-                'Your database uses character set "' . $defaultDatabaseCharset . '", ' .
-                'but only "utf8" is supported with TYPO3. You probably want to change this before proceeding.'
+            $result = new FlashMessage(
+                'Your database uses character set "' . $defaultDatabaseCharset . '", '
+                    . 'but only "utf8" is supported with TYPO3. You probably want to change this before proceeding.',
+                'Invalid Charset',
+                FlashMessage::ERROR
             );
-            $result = $errorStatus;
         }
 
-        if ($result instanceof OkStatus && !empty($localConfigurationPathValuePairs)) {
+        if ($result->getSeverity() === FlashMessage::OK && !empty($localConfigurationPathValuePairs)) {
             $configurationManager->setLocalConfigurationValuesByPathValuePairs($localConfigurationPathValuePairs);
         }
 
index f2ccef7..baed3a9 100644 (file)
@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Install\Controller\Action\Step;
 
 use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Registry;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\Service\EnableFileService;
@@ -28,7 +29,7 @@ class DefaultConfiguration extends AbstractStepAction
     /**
      * Set defaults of auto configuration, mark installation as completed
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
     public function execute()
     {
index d8f5bbd..cb66042 100644 (file)
@@ -14,8 +14,14 @@ namespace TYPO3\CMS\Install\Controller\Action\Step;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Configuration\ConfigurationManager;
+use TYPO3\CMS\Core\Core\Bootstrap;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
+use TYPO3\CMS\Core\Package\PackageInterface;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\StatusUtility;
+use TYPO3\CMS\Install\FolderStructure\DefaultFactory;
+use TYPO3\CMS\Install\Service\EnableFileService;
 use TYPO3\CMS\Install\SystemEnvironment\Check;
 use TYPO3\CMS\Install\SystemEnvironment\SetupCheck;
 
@@ -33,32 +39,26 @@ class EnvironmentAndFolders extends AbstractStepAction
      * - Create main folder structure
      * - Create typo3conf/LocalConfiguration.php
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
     public function execute()
     {
-        /** @var $folderStructureFactory \TYPO3\CMS\Install\FolderStructure\DefaultFactory */
-        $folderStructureFactory = GeneralUtility::makeInstance(\TYPO3\CMS\Install\FolderStructure\DefaultFactory::class);
-        /** @var $structureFacade \TYPO3\CMS\Install\FolderStructure\StructureFacade */
+        $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
         $structureFacade = $folderStructureFactory->getStructure();
-        $structureFixMessages = $structureFacade->fix();
-        /** @var \TYPO3\CMS\Install\Status\StatusUtility $statusUtility */
-        $statusUtility = GeneralUtility::makeInstance(StatusUtility::class);
-        $errorsFromStructure = $statusUtility->filterBySeverity($structureFixMessages, 'error');
+        $structureFixMessageQueue = $structureFacade->fix();
+        $errorsFromStructure = $structureFixMessageQueue->getAllMessages(FlashMessage::ERROR);
 
         if (@is_dir(PATH_typo3conf)) {
-            /** @var \TYPO3\CMS\Core\Configuration\ConfigurationManager $configurationManager */
-            $configurationManager = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
+            $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
             $configurationManager->createLocalConfigurationFromFactoryConfiguration();
 
             // Create a PackageStates.php with all packages activated marked as "part of factory default"
             if (!file_exists(PATH_typo3conf . 'PackageStates.php')) {
                 /** @var \TYPO3\CMS\Core\Package\FailsafePackageManager $packageManager */
-                $packageManager = \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->getEarlyInstance(\TYPO3\CMS\Core\Package\PackageManager::class);
+                $packageManager = Bootstrap::getInstance()->getEarlyInstance(\TYPO3\CMS\Core\Package\PackageManager::class);
                 $packages = $packageManager->getAvailablePackages();
                 foreach ($packages as $package) {
-                    /** @var $package \TYPO3\CMS\Core\Package\PackageInterface */
-                    if ($package instanceof \TYPO3\CMS\Core\Package\PackageInterface
+                    if ($package instanceof PackageInterface
                         && $package->isPartOfFactoryDefault()
                     ) {
                         $packageManager->activatePackage($package->getPackageKey());
@@ -68,8 +68,7 @@ class EnvironmentAndFolders extends AbstractStepAction
             }
 
             // Create enable install tool file after typo3conf & LocalConfiguration were created
-            /** @var \TYPO3\CMS\Install\Service\EnableFileService $installToolService */
-            $installToolService = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Service\EnableFileService::class);
+            $installToolService = GeneralUtility::makeInstance(EnableFileService::class);
             $installToolService->removeFirstInstallFile();
             $installToolService->createInstallToolEnableFile();
         }
@@ -97,29 +96,34 @@ class EnvironmentAndFolders extends AbstractStepAction
      */
     protected function executeAction()
     {
-        $statusObjects = array_merge(
-            GeneralUtility::makeInstance(Check::class)->getStatus(),
-            GeneralUtility::makeInstance(SetupCheck::class)->getStatus()
-        );
-        /** @var \TYPO3\CMS\Install\Status\StatusUtility $statusUtility */
-        $statusUtility = GeneralUtility::makeInstance(StatusUtility::class);
-        $environmentStatus = $statusUtility->sortBySeverity($statusObjects);
-        $alerts = $statusUtility->filterBySeverity($statusObjects, 'alert');
-        $this->view->assign('alerts', $alerts);
-        $this->view->assign('environmentStatus', $environmentStatus);
+        $systemCheckMessageQueue = new FlashMessageQueue('install');
+        $checkMessages = (new Check())->getStatus();
+        foreach ($checkMessages as $message) {
+            $systemCheckMessageQueue->enqueue($message);
+        }
+        $setupCheckMessages = (new SetupCheck())->getStatus();
+        foreach ($setupCheckMessages as $message) {
+            $systemCheckMessageQueue->enqueue($message);
+        }
+        $environmentStatus = [
+            'error' => $systemCheckMessageQueue->getAllMessages(FlashMessage::ERROR),
+            'warning' => $systemCheckMessageQueue->getAllMessages(FlashMessage::WARNING),
+        ];
 
-        /** @var $folderStructureFactory \TYPO3\CMS\Install\FolderStructure\DefaultFactory */
-        $folderStructureFactory = GeneralUtility::makeInstance(\TYPO3\CMS\Install\FolderStructure\DefaultFactory::class);
-        /** @var $structureFacade \TYPO3\CMS\Install\FolderStructure\StructureFacade */
+        $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
         $structureFacade = $folderStructureFactory->getStructure();
-        $structureMessages = $structureFacade->getStatus();
-        /** @var $statusUtility \TYPO3\CMS\Install\Status\StatusUtility */
-        $structureErrors = $statusUtility->filterBySeverity($structureMessages, 'error');
-        $this->view->assign('structureErrors', $structureErrors);
+        $structureMessageQueue = $structureFacade->getStatus();
+        $structureErrors = $structureMessageQueue->getAllMessages(FlashMessage::ERROR);
 
         if (!empty($environmentStatus['error']) || !empty($environmentStatus['warning']) || !empty($structureErrors)) {
             $this->view->assign('errorsOrWarningsFromStatus', true);
         }
+
+        $this->view->assignMultiple([
+            'environmentStatus' => $environmentStatus,
+            'structureErrors' => $structureErrors,
+        ]);
+
         $this->assignSteps();
 
         return $this->view->render();
index dccb9c8..ef3f1cd 100644 (file)
@@ -14,7 +14,7 @@ namespace TYPO3\CMS\Install\Controller\Action\Step;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Install\Controller\Action;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 
 /**
  * Interface implemented by single steps
@@ -24,7 +24,7 @@ interface StepInterface
     /**
      * Execute a step
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
     public function execute();
 
index b7e5d47..0f92856 100644 (file)
@@ -16,15 +16,16 @@ namespace TYPO3\CMS\Install\Exception;
  */
 
 use Throwable;
-use TYPO3\CMS\Install\Status\StatusInterface;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Install\Exception;
 
 /**
  * An exception if the authentication is needed
  */
-class AuthenticationRequiredException extends \TYPO3\CMS\Install\Exception
+class AuthenticationRequiredException extends Exception
 {
     /**
-     * @var StatusInterface
+     * @var FlashMessage
      */
     protected $messageObject;
 
@@ -32,18 +33,18 @@ class AuthenticationRequiredException extends \TYPO3\CMS\Install\Exception
      * @param string $message
      * @param int $code
      * @param Throwable|null $previous
-     * @param StatusInterface|null $messageObject
+     * @param FlashMessage|null $messageObject
      */
-    public function __construct($message = '', $code = 0, Throwable $previous = null, StatusInterface $messageObject = null)
+    public function __construct($message = '', $code = 0, Throwable $previous = null, FlashMessage $messageObject = null)
     {
         parent::__construct($message, $code, $previous);
         $this->messageObject = $messageObject;
     }
 
     /**
-     * @return StatusInterface
+     * @return FlashMessage
      */
-    public function getMessageObject(): StatusInterface
+    public function getMessageObject(): FlashMessage
     {
         return $this->messageObject;
     }
index 6686236..5a74306 100644 (file)
@@ -14,7 +14,7 @@ namespace TYPO3\CMS\Install\FolderStructure;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Install\Status;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 
 /**
  * Abstract node implements common methods
@@ -135,9 +135,9 @@ abstract class AbstractNode
      * Fix permission if they are not equal to target permission
      *
      * @throws Exception
-     * @return \TYPO3\CMS\Install\Status\StatusInterface
+     * @return FlashMessage
      */
-    protected function fixPermission()
+    protected function fixPermission(): FlashMessage
     {
         if ($this->isPermissionCorrect()) {
             throw new Exception(
@@ -147,17 +147,17 @@ abstract class AbstractNode
         }
         $result = @chmod($this->getAbsolutePath(), octdec($this->getTargetPermission()));
         if ($result === true) {
-            $status = new Status\OkStatus();
-            $status->setTitle('Fixed permission on ' . $this->getRelativePathBelowSiteRoot() . '.');
-        } else {
-            $status = new Status\NoticeStatus();
-            $status->setTitle('Permission change on ' . $this->getRelativePathBelowSiteRoot() . ' not successful');
-            $status->setMessage(
-                'Permissions could not be changed to ' . $this->getTargetPermission() .
-                    '. This only is a problem if files and folders within this node cannot be written.'
+            return new FlashMessage(
+                '',
+                'Fixed permission on ' . $this->getRelativePathBelowSiteRoot() . '.'
             );
         }
-        return $status;
+        return new FlashMessage(
+            'Permissions could not be changed to ' . $this->getTargetPermission()
+                . '. This only is a problem if files and folders within this node cannot be written.',
+            'Permission change on ' . $this->getRelativePathBelowSiteRoot() . ' not successful',
+            FlashMessage::NOTICE
+        );
     }
 
     /**
index ca9ef6e..034d402 100644 (file)
@@ -14,7 +14,7 @@ namespace TYPO3\CMS\Install\FolderStructure;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Install\Status;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 
 /**
  * Service class to check the default folder permissions
@@ -51,9 +51,9 @@ class DefaultPermissionsCheck
      * If it permits only user read/write: Ok
      *
      * @param string $which fileCreateMask or folderCreateMask
-     * @return \TYPO3\CMS\Install\Status\StatusInterface
+     * @return FlashMessage
      */
-    public function getMaskStatus($which)
+    public function getMaskStatus($which): FlashMessage
     {
         $octal = '0' . $GLOBALS['TYPO3_CONF_VARS']['SYS'][$which];
         $dec = octdec($octal);
@@ -72,31 +72,30 @@ class DefaultPermissionsCheck
         $extraMessage = '';
         $groupPermissions = false;
         if (!$perms['uw'] || !$perms['ur']) {
-            $permissionStatus = new Status\ErrorStatus();
+            $permissionStatus = FlashMessage::ERROR;
             $extraMessage = ' (not read or writable by the user)';
         } elseif ($perms['ow']) {
             if (TYPO3_OS === 'WIN') {
-                $permissionStatus = new Status\InfoStatus();
+                $permissionStatus = FlashMessage::INFO;
                 $extraMessage = ' (writable by anyone on the server). This is the default behavior on a Windows system';
             } else {
-                $permissionStatus = new Status\ErrorStatus();
+                $permissionStatus = FlashMessage::ERROR;
                 $extraMessage = ' (writable by anyone on the server)';
             }
         } elseif ($perms['or']) {
-            $permissionStatus = new Status\NoticeStatus();
+            $permissionStatus = FlashMessage::NOTICE;
             $extraMessage = ' (readable by anyone on the server). This is the default set by TYPO3 CMS to be as much compatible as possible but if your system allows, please consider to change rights';
         } elseif ($perms['gw']) {
-            $permissionStatus = new Status\OkStatus();
+            $permissionStatus = FlashMessage::OK;
             $extraMessage = ' (group writable)';
             $groupPermissions = true;
         } elseif ($perms['gr']) {
-            $permissionStatus = new Status\OkStatus();
+            $permissionStatus = FlashMessage::OK;
             $extraMessage = ' (group readable)';
             $groupPermissions = true;
         } else {
-            $permissionStatus = new Status\OkStatus();
+            $permissionStatus = FlashMessage::OK;
         }
-        $permissionStatus->setTitle($this->names[$which] . ' (SYS/' . $which . ')');
         $message = 'Recommended: ' . $this->recommended[$which] . '.';
         $message .= ' Currently configured as ';
         if ($GLOBALS['TYPO3_CONF_VARS']['SYS'][$which] === $this->recommended[$which]) {
@@ -111,7 +110,10 @@ class DefaultPermissionsCheck
                 $message .= ' Your site is configured (SYS/createGroup) to write as group \'' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['createGroup'] . '\'.';
             }
         }
-        $permissionStatus->setMessage($message);
-        return $permissionStatus;
+        return new FlashMessage(
+            $message,
+            $this->names[$which] . ' (SYS/' . $which . ')',
+            $permissionStatus
+        );
     }
 }
index 08edf78..f9743ad 100644 (file)
@@ -14,8 +14,8 @@ namespace TYPO3\CMS\Install\FolderStructure;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\StringUtility;
-use TYPO3\CMS\Install\Status;
 
 /**
  * A directory
@@ -65,15 +65,17 @@ class DirectoryNode extends AbstractNode implements NodeInterface
     /**
      * Get own status and status of child objects
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    public function getStatus()
+    public function getStatus(): array
     {
         $result = [];
         if (!$this->exists()) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('Directory ' . $this->getRelativePathBelowSiteRoot() . ' does not exist');
-            $status->setMessage('The Install Tool can try to create it');
+            $status = new FlashMessage(
+                'The Install Tool can try to create it',
+                'Directory ' . $this->getRelativePathBelowSiteRoot() . ' does not exist',
+                FlashMessage::WARNING
+            );
             $result[] = $status;
         } else {
             $result = $this->getSelfStatus();
@@ -103,9 +105,9 @@ class DirectoryNode extends AbstractNode implements NodeInterface
      *
      * If there is nothing to fix, returns an empty array
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    public function fix()
+    public function fix(): array
     {
         $result = $this->fixSelf();
         foreach ($this->children as $child) {
@@ -122,7 +124,7 @@ class DirectoryNode extends AbstractNode implements NodeInterface
      * - if there is no "write" permissions, try to fix it
      * - leave it alone otherwise
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
     protected function fixSelf()
     {
@@ -130,7 +132,7 @@ class DirectoryNode extends AbstractNode implements NodeInterface
         if (!$this->exists()) {
             $resultCreateDirectory = $this->createDirectory();
             $result[] = $resultCreateDirectory;
-            if ($resultCreateDirectory instanceof Status\OkStatus &&
+            if ($resultCreateDirectory->getSeverity() === FlashMessage::OK &&
                 !$this->isPermissionCorrect()
             ) {
                 $result[] = $this->fixPermission();
@@ -140,21 +142,23 @@ class DirectoryNode extends AbstractNode implements NodeInterface
             // Try it:
             $result[] = $this->fixPermission();
         } elseif (!$this->isDirectory()) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('Path ' . $this->getRelativePathBelowSiteRoot() . ' is not a directory');
             $fileType = @filetype($this->getAbsolutePath());
             if ($fileType) {
-                $status->setMessage(
+                $messageBody =
                     'The target ' . $this->getRelativePathBelowSiteRoot() . ' should be a directory,' .
                     ' but is of type ' . $fileType . '. This cannot be fixed automatically. Please investigate.'
-                );
+                ;
             } else {
-                $status->setMessage(
+                $messageBody =
                     'The target ' . $this->getRelativePathBelowSiteRoot() . ' should be a directory,' .
                     ' but is of unknown type, probably because an upper level directory does not exist. Please investigate.'
-                );
+                ;
             }
-            $result[] = $status;
+            $result[] = new FlashMessage(
+                $messageBody,
+                'Path ' . $this->getRelativePathBelowSiteRoot() . ' is not a directory',
+                FlashMessage::ERROR
+            );
         }
         return $result;
     }
@@ -163,9 +167,9 @@ class DirectoryNode extends AbstractNode implements NodeInterface
      * Create directory if not exists
      *
      * @throws Exception
-     * @return \TYPO3\CMS\Install\Status\StatusInterface
+     * @return FlashMessage
      */
-    protected function createDirectory()
+    protected function createDirectory(): FlashMessage
     {
         if ($this->exists()) {
             throw new Exception(
@@ -175,58 +179,53 @@ class DirectoryNode extends AbstractNode implements NodeInterface
         }
         $result = @mkdir($this->getAbsolutePath());
         if ($result === true) {
-            $status = new Status\OkStatus();
-            $status->setTitle('Directory ' . $this->getRelativePathBelowSiteRoot() . ' successfully created.');
-        } else {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('Directory ' . $this->getRelativePathBelowSiteRoot() . ' not created!');
-            $status->setMessage(
-                'The target directory could not be created. There is probably a' .
-                ' group or owner permission problem on the parent directory.'
+            return new FlashMessage(
+                '',
+                'Directory ' . $this->getRelativePathBelowSiteRoot() . ' successfully created.'
             );
         }
-        return $status;
+        return new FlashMessage(
+            'The target directory could not be created. There is probably a'
+                . ' group or owner permission problem on the parent directory.',
+            'Directory ' . $this->getRelativePathBelowSiteRoot() . ' not created!',
+            FlashMessage::ERROR
+        );
     }
 
     /**
      * Get status of directory - used in root and directory node
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    protected function getSelfStatus()
+    protected function getSelfStatus(): array
     {
         $result = [];
         if (!$this->isDirectory()) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle($this->getRelativePathBelowSiteRoot() . ' is not a directory');
-            $status->setMessage(
-                'Directory ' . $this->getRelativePathBelowSiteRoot() . ' should be a directory,' .
-                ' but is of type ' . filetype($this->getAbsolutePath())
+            $result[] = new FlashMessage(
+                'Directory ' . $this->getRelativePathBelowSiteRoot() . ' should be a directory,'
+                    . ' but is of type ' . filetype($this->getAbsolutePath()),
+                $this->getRelativePathBelowSiteRoot() . ' is not a directory',
+                FlashMessage::ERROR
             );
-            $result[] = $status;
         } elseif (!$this->isWritable()) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('Directory ' . $this->getRelativePathBelowSiteRoot() . ' is not writable');
-            $status->setMessage(
-                'Path ' . $this->getAbsolutePath() . ' exists, but no file underneath it' .
-                ' can be created.'
+            $result[] = new FlashMessage(
+                'Path ' . $this->getAbsolutePath() . ' exists, but no file underneath it'
+                    . ' can be created.',
+                'Directory ' . $this->getRelativePathBelowSiteRoot() . ' is not writable',
+                FlashMessage::ERROR
             );
-            $result[] = $status;
         } elseif (!$this->isPermissionCorrect()) {
-            $status = new Status\NoticeStatus();
-            $status->setTitle('Directory ' . $this->getRelativePathBelowSiteRoot() . ' permissions mismatch');
-            $status->setMessage(
-                'Default configured permissions are ' . $this->getTargetPermission() .
-                ' but current permissions are ' . $this->getCurrentPermission()
+            $result[] = new FlashMessage(
+                'Default configured permissions are ' . $this->getTargetPermission()
+                    . ' but current permissions are ' . $this->getCurrentPermission(),
+                'Directory ' . $this->getRelativePathBelowSiteRoot() . ' permissions mismatch',
+                FlashMessage::NOTICE
             );
-            $result[] = $status;
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('Directory ' . $this->getRelativePathBelowSiteRoot());
-            $status->setMessage(
-                'Is a directory with the configured permissions of ' . $this->getTargetPermission()
+            $result[] = new FlashMessage(
+                'Is a directory with the configured permissions of ' . $this->getTargetPermission(),
+                'Directory ' . $this->getRelativePathBelowSiteRoot()
             );
-            $result[] = $status;
         }
         return $result;
     }
@@ -234,9 +233,9 @@ class DirectoryNode extends AbstractNode implements NodeInterface
     /**
      * Get status of children
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    protected function getChildrenStatus()
+    protected function getChildrenStatus(): array
     {
         $result = [];
         foreach ($this->children as $child) {
index c63a63d..566f80a 100644 (file)
@@ -14,7 +14,7 @@ namespace TYPO3\CMS\Install\FolderStructure;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Install\Status;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 
 /**
  * A file
@@ -87,16 +87,17 @@ class FileNode extends AbstractNode implements NodeInterface
      * Returns warning if file not exists
      * Returns error if file exists but content is not as expected (can / shouldn't be fixed)
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    public function getStatus()
+    public function getStatus(): array
     {
         $result = [];
         if (!$this->exists()) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('File ' . $this->getRelativePathBelowSiteRoot() . ' does not exist');
-            $status->setMessage('By using "Try to fix errors" we can try to create it');
-            $result[] = $status;
+            $result[] = new FlashMessage(
+                'By using "Try to fix errors" we can try to create it',
+                'File ' . $this->getRelativePathBelowSiteRoot() . ' does not exist',
+                FlashMessage::WARNING
+            );
         } else {
             $result = $this->getSelfStatus();
         }
@@ -108,9 +109,9 @@ class FileNode extends AbstractNode implements NodeInterface
      *
      * If there is nothing to fix, returns an empty array
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    public function fix()
+    public function fix(): array
     {
         $result = $this->fixSelf();
         return $result;
@@ -119,15 +120,15 @@ class FileNode extends AbstractNode implements NodeInterface
     /**
      * Fix this node: create if not there, fix permissions
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    protected function fixSelf()
+    protected function fixSelf(): array
     {
         $result = [];
         if (!$this->exists()) {
             $resultCreateFile = $this->createFile();
             $result[] = $resultCreateFile;
-            if ($resultCreateFile instanceof Status\OkStatus
+            if ($resultCreateFile->getSeverity() === FlashMessage::OK
                 && !is_null($this->targetContent)
             ) {
                 $result[] = $this->setContent();
@@ -136,21 +137,23 @@ class FileNode extends AbstractNode implements NodeInterface
                 }
             }
         } elseif (!$this->isFile()) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('Path ' . $this->getRelativePathBelowSiteRoot() . ' is not a file');
             $fileType = @filetype($this->getAbsolutePath());
             if ($fileType) {
-                $status->setMessage(
+                $messageBody =
                     'The target ' . $this->getRelativePathBelowSiteRoot() . ' should be a file,' .
                     ' but is of type ' . $fileType . '. This cannot be fixed automatically. Please investigate.'
-                );
+                ;
             } else {
-                $status->setMessage(
+                $messageBody =
                     'The target ' . $this->getRelativePathBelowSiteRoot() . ' should be a file,' .
                     ' but is of unknown type, probably because an upper level directory does not exist. Please investigate.'
-                );
+                ;
             }
-            $result[] = $status;
+            $result[] = new FlashMessage(
+                $messageBody,
+                'Path ' . $this->getRelativePathBelowSiteRoot() . ' is not a file',
+                FlashMessage::ERROR
+            );
         } elseif (!$this->isPermissionCorrect()) {
             $result[] = $this->fixPermission();
         }
@@ -161,9 +164,9 @@ class FileNode extends AbstractNode implements NodeInterface
      * Create file if not exists
      *
      * @throws Exception
-     * @return \TYPO3\CMS\Install\Status\StatusInterface
+     * @return FlashMessage
      */
-    protected function createFile()
+    protected function createFile(): FlashMessage
     {
         if ($this->exists()) {
             throw new Exception(
@@ -173,66 +176,60 @@ class FileNode extends AbstractNode implements NodeInterface
         }
         $result = @touch($this->getAbsolutePath());
         if ($result === true) {
-            $status = new Status\OkStatus();
-            $status->setTitle('File ' . $this->getRelativePathBelowSiteRoot() . ' successfully created.');
-        } else {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('File ' . $this->getRelativePathBelowSiteRoot() . ' not created!');
-            $status->setMessage(
-                'The target file could not be created. There is probably a' .
-                ' group or owner permission problem on the parent directory.'
+            return new FlashMessage(
+                '',
+                'File ' . $this->getRelativePathBelowSiteRoot() . ' successfully created.'
             );
         }
-        return $status;
+        return new FlashMessage(
+            'The target file could not be created. There is probably a'
+                . ' group or owner permission problem on the parent directory.',
+            'File ' . $this->getRelativePathBelowSiteRoot() . ' not created!',
+            FlashMessage::ERROR
+        );
     }
 
     /**
      * Get status of file
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    protected function getSelfStatus()
+    protected function getSelfStatus(): array
     {
         $result = [];
         if (!$this->isFile()) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle($this->getRelativePathBelowSiteRoot() . ' is not a file');
-            $status->setMessage(
-                'Path ' . $this->getAbsolutePath() . ' should be a file,' .
-                ' but is of type ' . filetype($this->getAbsolutePath())
+            $result[] = new FlashMessage(
+                'Path ' . $this->getAbsolutePath() . ' should be a file,'
+                    . ' but is of type ' . filetype($this->getAbsolutePath()),
+                $this->getRelativePathBelowSiteRoot() . ' is not a file',
+                FlashMessage::ERROR
             );
-            $result[] = $status;
         } elseif (!$this->isWritable()) {
-            $status = new Status\NoticeStatus();
-            $status->setTitle('File ' . $this->getRelativePathBelowSiteRoot() . ' is not writable');
-            $status->setMessage(
-                'File ' . $this->getRelativePathBelowSiteRoot() . ' exists, but is not writable.'
+            $result[] = new FlashMessage(
+                'File ' . $this->getRelativePathBelowSiteRoot() . ' exists, but is not writable.',
+                'File ' . $this->getRelativePathBelowSiteRoot() . ' is not writable',
+                FlashMessage::NOTICE
             );
-            $result[] = $status;
         } elseif (!$this->isPermissionCorrect()) {
-            $status = new Status\NoticeStatus();
-            $status->setTitle('File ' . $this->getRelativePathBelowSiteRoot() . ' permissions mismatch');
-            $status->setMessage(
-                'Default configured permissions are ' . $this->getTargetPermission() .
-                ' but file permissions are ' . $this->getCurrentPermission()
+            $result[] = new FlashMessage(
+                'Default configured permissions are ' . $this->getTargetPermission()
+                    . ' but file permissions are ' . $this->getCurrentPermission(),
+                'File ' . $this->getRelativePathBelowSiteRoot() . ' permissions mismatch',
+                FlashMessage::NOTICE
             );
-            $result[] = $status;
         }
         if ($this->isFile() && !$this->isContentCorrect()) {
-            $status = new Status\NoticeStatus();
-            $status->setTitle('File ' . $this->getRelativePathBelowSiteRoot() . ' content differs');
-            $status->setMessage(
-                'File content is not identical to default content. This file may have been changed manually.' .
-                ' The Install Tool will not overwrite the current version!'
+            $result[] = new FlashMessage(
+                'File content is not identical to default content. This file may have been changed manually.'
+                    . ' The Install Tool will not overwrite the current version!',
+                'File ' . $this->getRelativePathBelowSiteRoot() . ' content differs',
+                FlashMessage::NOTICE
             );
-            $result[] = $status;
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('File ' . $this->getRelativePathBelowSiteRoot());
-            $status->setMessage(
-                'Is a file with the default content and configured permissions of ' . $this->getTargetPermission()
+            $result[] = new FlashMessage(
+                'Is a file with the default content and configured permissions of ' . $this->getTargetPermission(),
+                'File ' . $this->getRelativePathBelowSiteRoot()
             );
-            $result[] = $status;
         }
         return $result;
     }
@@ -269,9 +266,9 @@ class FileNode extends AbstractNode implements NodeInterface
      * Sets content of file to target content
      *
      * @throws Exception If file does not exist
-     * @return \TYPO3\CMS\Install\Status\StatusInterface
+     * @return FlashMessage
      */
-    protected function setContent()
+    protected function setContent(): FlashMessage
     {
         $absolutePath = $this->getAbsolutePath();
         if (is_link($absolutePath) || !is_file($absolutePath)) {
@@ -288,14 +285,16 @@ class FileNode extends AbstractNode implements NodeInterface
         }
         $result = @file_put_contents($absolutePath, $this->targetContent);
         if ($result !== false) {
-            $status = new Status\OkStatus();
-            $status->setTitle('Set content to ' . $this->getRelativePathBelowSiteRoot());
-        } else {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('Setting content to ' . $this->getRelativePathBelowSiteRoot() . ' failed');
-            $status->setMessage('Setting content of the file failed for unknown reasons.');
+            return new FlashMessage(
+                '',
+                'Set content to ' . $this->getRelativePathBelowSiteRoot()
+            );
         }
-        return $status;
+        return new FlashMessage(
+            'Setting content of the file failed for unknown reasons.',
+            'Setting content to ' . $this->getRelativePathBelowSiteRoot() . ' failed',
+            FlashMessage::ERROR
+        );
     }
 
     /**
index ecfdab1..fbf4287 100644 (file)
@@ -14,7 +14,7 @@ namespace TYPO3\CMS\Install\FolderStructure;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Install\Status;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 
 /**
  * A link
@@ -63,61 +63,71 @@ class LinkNode extends AbstractNode implements NodeInterface
      * Returns OK status if is link and possible target is correct
      * Else returns error (not fixable)
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    public function getStatus()
+    public function getStatus(): array
     {
         if ($this->isWindowsOs()) {
-            $status = new Status\InfoStatus();
-            $status->setTitle($this->getRelativePathBelowSiteRoot() . ' should be a link, but this support is incomplete for Windows.');
-            $status->setMessage(
-                'This node is not handled for Windows OS and should be checked manually.'
-            );
-            return [$status];
+            return [
+                new FlashMessage(
+                    'This node is not handled for Windows OS and should be checked manually.',
+                    $this->getRelativePathBelowSiteRoot() . ' should be a link, but this support is incomplete for Windows.',
+                    FlashMessage::INFO
+                ),
+            ];
         }
 
         if (!$this->exists()) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle($this->getRelativePathBelowSiteRoot() . ' should be a link, but it does not exist');
-            $status->setMessage('Links cannot be fixed by this system');
-            return [$status];
+            return [
+                new FlashMessage(
+                    'Links cannot be fixed by this system',
+                    $this->getRelativePathBelowSiteRoot() . ' should be a link, but it does not exist',
+                    FlashMessage::ERROR
+                ),
+            ];
         }
 
         if (!$this->isLink()) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('Path ' . $this->getRelativePathBelowSiteRoot() . ' is not a link');
             $type = @filetype($this->getAbsolutePath());
             if ($type) {
-                $status->setMessage(
+                $messageBody =
                     'The target ' . $this->getRelativePathBelowSiteRoot() . ' should be a link,' .
                     ' but is of type ' . $type . '. This cannot be fixed automatically. Please investigate.'
-                );
+                ;
             } else {
-                $status->setMessage(
+                $messageBody =
                     'The target ' . $this->getRelativePathBelowSiteRoot() . ' should be a file,' .
                     ' but is of unknown type, probably because an upper level directory does not exist. Please investigate.'
-                );
+                ;
             }
-            return [$status];
+            return [
+                new FlashMessage(
+                    $messageBody,
+                    'Path ' . $this->getRelativePathBelowSiteRoot() . ' is not a link',
+                    FlashMessage::WARNING
+                ),
+            ];
         }
 
         if (!$this->isTargetCorrect()) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle($this->getRelativePathBelowSiteRoot() . ' is a link, but link target is not as specified');
-            $status->setMessage(
-                'Link target should be ' . $this->getTarget() . ' but is ' . $this->getCurrentTarget()
-            );
-            return [$status];
+            return [
+                new FlashMessage(
+                    'Link target should be ' . $this->getTarget() . ' but is ' . $this->getCurrentTarget(),
+                    $this->getRelativePathBelowSiteRoot() . ' is a link, but link target is not as specified',
+                    FlashMessage::ERROR
+                ),
+            ];
         }
-
-        $status = new Status\OkStatus();
         $message = 'Is a link';
         if ($this->getTarget() !== '') {
             $message .= ' and correctly points to target ' . $this->getTarget();
         }
-        $status->setTitle($this->getRelativePathBelowSiteRoot());
-        $status->setMessage($message);
-        return [$status];
+        return [
+            new FlashMessage(
+                $message,
+                $this->getRelativePathBelowSiteRoot()
+            ),
+        ];
     }
 
     /**
@@ -125,9 +135,9 @@ class LinkNode extends AbstractNode implements NodeInterface
      *
      * If there is nothing to fix, returns an empty array
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    public function fix()
+    public function fix(): array
     {
         return [];
     }
index b47793c..b09693c 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Install\FolderStructure;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+
 /**
  * Interface for structure nodes root, link, file, ...
  */
@@ -44,9 +46,9 @@ interface NodeInterface
     /**
      * Get the status of the object tree, recursive for directory and root node
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    public function getStatus();
+    public function getStatus(): array;
 
     /**
      * Check if node is writable - can be created and permission can be fixed
@@ -60,7 +62,7 @@ interface NodeInterface
      *
      * If there is nothing to fix, returns an empty array
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    public function fix();
+    public function fix(): array;
 }
index 7b749bf..ddd109a 100644 (file)
@@ -14,7 +14,7 @@ namespace TYPO3\CMS\Install\FolderStructure;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Install\Status;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 
 /**
  * Root node of structure
@@ -61,15 +61,17 @@ class RootNode extends DirectoryNode implements RootNodeInterface
     /**
      * Get own status and status of child objects - Root node gives error status if not exists
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessage[]
      */
-    public function getStatus()
+    public function getStatus(): array
     {
         $result = [];
         if (!$this->exists()) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle($this->getAbsolutePath() . ' does not exist');
-            $result[] = $status;
+            $result[] = new FlashMessage(
+                '',
+                $this->getAbsolutePath() . ' does not exist',
+                FlashMessage::ERROR
+            );
         } else {
             $result = $this->getSelfStatus();
         }
index 3385b24..c4d1a2b 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Install\FolderStructure;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
+
 /**
  * Structure facade, a facade class in front of root node.
  * This is the main API interface to the node structure and should
@@ -41,20 +43,28 @@ class StructureFacade implements StructureFacadeInterface
     /**
      * Get status of node tree
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessageQueue
      */
-    public function getStatus()
+    public function getStatus(): FlashMessageQueue
     {
-        return $this->structure->getStatus();
+        $messageQueue = new FlashMessageQueue('install');
+        foreach ($this->structure->getStatus() as $message) {
+            $messageQueue->enqueue($message);
+        }
+        return $messageQueue;
     }
 
     /**
      * Fix structure
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessageQueue
      */
-    public function fix()
+    public function fix(): FlashMessageQueue
     {
-        return $this->structure->fix();
+        $messageQueue = new FlashMessageQueue('install');
+        foreach ($this->structure->fix() as $message) {
+            $messageQueue->enqueue($message);
+        }
+        return $messageQueue;
     }
 }
index 24fa0e9..e66e423 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Install\FolderStructure;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
+
 /**
  * Interface of structure facade, a facade class in front of root node
  */
@@ -29,14 +31,14 @@ interface StructureFacadeInterface
     /**
      * Get status of node tree
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessageQueue
      */
-    public function getStatus();
+    public function getStatus(): FlashMessageQueue;
 
     /**
      * Fix structure
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessageQueue
      */
-    public function fix();
+    public function fix(): FlashMessageQueue;
 }
index 3c19c85..87351e0 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Install\Http;
 use Psr\Http\Message\ServerRequestInterface;
 use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Http\RequestHandlerInterface;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\Controller\Exception;
 use TYPO3\CMS\Install\Controller\Exception\RedirectException;
@@ -184,12 +185,11 @@ class RecoveryRequestHandler implements RequestHandlerInterface
             if ($this->isInitialInstallationInProgress()) {
                 throw new RedirectException('Initial installation in progress', 1504032139);
             }
-            /** @var $message \TYPO3\CMS\Install\Status\ErrorStatus */
-            $message = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Status\ErrorStatus::class);
-            $message->setTitle('Invalid form token');
-            $message->setMessage(
-                    'The form protection token was invalid. You have been logged out, please log in and try again.'
-                );
+            $message = new FlashMessage(
+                'The form protection token was invalid. You have been logged out, please log in and try again.',
+                'Invalid form token',
+                FlashMessage::ERROR
+            );
             throw new AuthenticationRequiredException('Invalid form token', 1504030706, null, $message);
         }
     }
@@ -210,11 +210,10 @@ class RecoveryRequestHandler implements RequestHandlerInterface
             if ($this->isInitialInstallationInProgress()) {
                 throw new RedirectException('Initial installation in progress', 1504032125);
             }
-            /** @var $message \TYPO3\CMS\Install\Status\ErrorStatus */
-            $message = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Status\ErrorStatus::class);
-            $message->setTitle('Session expired');
-            $message->setMessage(
-                'Your Install Tool session has expired. You have been logged out, please log in and try again.'
+            $message = new FlashMessage(
+                'Your Install Tool session has expired. You have been logged out, please log in and try again.',
+                'Session expired',
+                FlashMessage::ERROR
             );
             throw new AuthenticationRequiredException('Session expired', 1504030725, null, $message);
         }
index 96923c4..84096c4 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Install\Http;
 use Psr\Http\Message\ServerRequestInterface;
 use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Http\RequestHandlerInterface;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\Controller\AbstractController;
 use TYPO3\CMS\Install\Controller\Exception;
@@ -207,11 +208,10 @@ class RequestHandler implements RequestHandlerInterface
             $this->session->resetSession();
             $this->session->startSession();
 
-            /** @var $message \TYPO3\CMS\Install\Status\ErrorStatus */
-            $message = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Status\ErrorStatus::class);
-            $message->setTitle('Invalid form token');
-            $message->setMessage(
-                'The form protection token was invalid. You have been logged out, please log in and try again.'
+            $message = new FlashMessage(
+                'The form protection token was invalid. You have been logged out, please log in and try again.',
+                'Invalid form token',
+                FlashMessage::ERROR
             );
             throw new AuthenticationRequiredException('Invalid form token', 1504030810, null, $message);
         }
@@ -230,11 +230,10 @@ class RequestHandler implements RequestHandlerInterface
             $this->session->resetSession();
             $this->session->startSession();
 
-            /** @var $message \TYPO3\CMS\Install\Status\ErrorStatus */
-            $message = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Status\ErrorStatus::class);
-            $message->setTitle('Session expired');
-            $message->setMessage(
-                'Your Install Tool session has expired. You have been logged out, please log in and try again.'
+            $message = new FlashMessage(
+                'Your Install Tool session has expired. You have been logged out, please log in and try again.',
+                'Session expired',
+                FlashMessage::ERROR
             );
             throw new AuthenticationRequiredException('Session expired', 1504030839, null, $message);
         }
index afe01cc..c7d833c 100644 (file)
@@ -14,8 +14,14 @@ namespace TYPO3\CMS\Install\Report;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Install\SystemEnvironment\Check;
+use TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck;
+use TYPO3\CMS\Install\SystemEnvironment\SetupCheck;
 use TYPO3\CMS\Reports\ExtendedStatusProviderInterface;
+use TYPO3\CMS\Reports\Status;
 use TYPO3\CMS\Reports\StatusProviderInterface;
 
 /**
@@ -26,7 +32,7 @@ class EnvironmentStatusReport implements StatusProviderInterface, ExtendedStatus
     /**
      * Compile environment status report
      *
-     * @return \TYPO3\CMS\Reports\Status[]
+     * @return Status[]
      */
     public function getStatus()
     {
@@ -36,7 +42,7 @@ class EnvironmentStatusReport implements StatusProviderInterface, ExtendedStatus
     /**
      * Returns the detailed status of an extension or (sub)system
      *
-     * @return \TYPO3\CMS\Reports\Status[]
+     * @return Status[]
      */
     public function getDetailedStatus()
     {
@@ -45,16 +51,20 @@ class EnvironmentStatusReport implements StatusProviderInterface, ExtendedStatus
 
     /**
      * @param $verbose
-     * @return \TYPO3\CMS\Reports\Status[]
-     * @throws \TYPO3\CMS\Install\Exception
+     * @return Status[]
      */
     protected function getStatusInternal($verbose)
     {
-        $statusObjects = array_merge(
-            GeneralUtility::makeInstance(\TYPO3\CMS\Install\SystemEnvironment\Check::class)->getStatus(),
-            GeneralUtility::makeInstance(\TYPO3\CMS\Install\SystemEnvironment\SetupCheck::class)->getStatus(),
-            GeneralUtility::makeInstance(\TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck::class)->getStatus()
-        );
+        $statusMessageQueue = new FlashMessageQueue('install');
+        foreach (GeneralUtility::makeInstance(Check::class)->getStatus() as $message) {
+            $statusMessageQueue->enqueue($message);
+        }
+        foreach (GeneralUtility::makeInstance(SetupCheck::class)->getStatus() as $message) {
+            $statusMessageQueue->enqueue($message);
+        }
+        foreach (GeneralUtility::makeInstance(DatabaseCheck::class)->getStatus() as $message) {
+            $statusMessageQueue->enqueue($message);
+        }
         $reportStatusTypes = [
             'error' => [],
             'warning' => [],
@@ -62,14 +72,24 @@ class EnvironmentStatusReport implements StatusProviderInterface, ExtendedStatus
             'information' => [],
             'notice' => [],
         ];
-
-        /** @var $statusObject \TYPO3\CMS\Install\Status\AbstractStatus */
-        foreach ($statusObjects as $statusObject) {
-            $severityIdentifier = $statusObject->getSeverity();
-            if (empty($severityIdentifier) || !is_array($reportStatusTypes[$severityIdentifier])) {
-                throw new \TYPO3\CMS\Install\Exception('Unknown reports severity type', 1362602560);
+        foreach ($statusMessageQueue->toArray() as $message) {
+            switch ($message->getSeverity()) {
+                case FlashMessage::ERROR:
+                    $reportStatusTypes['error'][] = $message;
+                    break;
+                case FlashMessage::WARNING:
+                    $reportStatusTypes['warning'][] = $message;
+                    break;
+                case FlashMessage::OK:
+                    $reportStatusTypes['ok'][] = $message;
+                    break;
+                case FlashMessage::INFO:
+                    $reportStatusTypes['information'][] = $message;
+                    break;
+                case FlashMessage::NOTICE:
+                    $reportStatusTypes['notice'][] = $message;
+                    break;
             }
-            $reportStatusTypes[$severityIdentifier][] = $statusObject;
         }
 
         $statusArray = [];
@@ -93,7 +113,7 @@ class EnvironmentStatusReport implements StatusProviderInterface, ExtendedStatus
                 }
                 $severity = constant('\TYPO3\CMS\Reports\Status::' . strtoupper($type));
                 $statusArray[] = GeneralUtility::makeInstance(
-                    \TYPO3\CMS\Reports\Status::class,
+                    Status::class,
                     $GLOBALS['LANG']->sL($pathToXliff . ':environment.status.title'),
                     sprintf($GLOBALS['LANG']->sL($pathToXliff . ':environment.status.value'), $value),
                     $message,
index 8a05d9d..9c4fa3d 100644 (file)
@@ -15,18 +15,14 @@ namespace TYPO3\CMS\Install\Service;
  */
 
 use TYPO3\CMS\Core\Core\Bootstrap;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Service\OpcodeCacheService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
 use TYPO3\CMS\Install\FolderStructure\DefaultFactory;
 use TYPO3\CMS\Install\Service\Exception\RemoteFetchException;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\NoticeStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
-use TYPO3\CMS\Install\Status\StatusInterface;
-use TYPO3\CMS\Install\Status\StatusUtility;
-use TYPO3\CMS\Install\Status\WarningStatus;
 
 /**
  * Core update service.
@@ -46,9 +42,9 @@ class CoreUpdateService
     protected $coreVersionService;
 
     /**
-     * @var StatusInterface[]
+     * @var FlashMessageQueue
      */
-    protected $messages = [];
+    protected $messages;
 
     /**
      * Absolute path to download location
@@ -80,6 +76,7 @@ class CoreUpdateService
         $this->setDownloadTargetPath(PATH_site . 'typo3temp/var/transient/');
         $this->symlinkToCoreFiles = $this->discoverCurrentCoreSymlink();
         $this->downloadBaseUri = $this->coreVersionService->getDownloadBaseUri();
+        $this->messages = new FlashMessageQueue('install');
     }
 
     /**
@@ -120,9 +117,9 @@ class CoreUpdateService
     /**
      * Get messages of previous method call
      *
-     * @return StatusInterface[]
+     * @return FlashMessageQueue
      */
-    public function getMessages()
+    public function getMessages(): FlashMessageQueue
     {
         return $this->messages;
     }
@@ -139,14 +136,12 @@ class CoreUpdateService
             $this->coreVersionService->updateVersionMatrix();
         } catch (RemoteFetchException $e) {
             $success = false;
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(ErrorStatus::class);
-            $message->setTitle('Version matrix could not be fetched from get.typo3.org');
-            $message->setMessage(
+            $this->messages->enqueue(new FlashMessage(
                 'Current version specification could not be fetched from http://get.typo3.org/json.'
-                . ' This is probably a network issue, please fix it.'
-            );
-            $this->messages = [$message];
+                    . ' This is probably a network issue, please fix it.',
+                'Version matrix could not be fetched from get.typo3.org',
+                FlashMessage::ERROR
+            ));
         }
         return $success;
     }
@@ -156,41 +151,35 @@ class CoreUpdateService
      *
      * @param string $version The target version number
      * @return bool TRUE on success
-     * @throws \TYPO3\CMS\Install\Status\Exception
      */
     public function checkPreConditions($version)
     {
         $success = true;
-        $messages = [];
-
-        /** @var StatusUtility $statusUtility */
-        $statusUtility = GeneralUtility::makeInstance(StatusUtility::class);
 
         // Folder structure test: Update can be done only if folder structure returns no errors
-        /** @var $folderStructureFacade \TYPO3\CMS\Install\FolderStructure\StructureFacade */
         $folderStructureFacade = GeneralUtility::makeInstance(DefaultFactory::class)->getStructure();
-        $folderStructureErrors = $statusUtility->filterBySeverity($folderStructureFacade->getStatus(), 'error');
-        $folderStructureWarnings = $statusUtility->filterBySeverity($folderStructureFacade->getStatus(), 'warning');
+        $folderStructureMessageQueue = $folderStructureFacade->getStatus();
+        $folderStructureErrors = $folderStructureMessageQueue->getAllMessages(FlashMessage::ERROR);
+        $folderStructureWarnings = $folderStructureMessageQueue->getAllMessages(FlashMessage::WARNING);
         if (!empty($folderStructureErrors) || !empty($folderStructureWarnings) || !is_link(PATH_site . 'typo3_src')) {
             $success = false;
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(ErrorStatus::class);
-            $message->setTitle('Automatic TYPO3 CMS core update not possible: Folder structure has errors or warnings');
-            $message->setMessage(
+            $this->messages->enqueue(new FlashMessage(
                 'To perform an update, the folder structure of this TYPO3 CMS instance must'
-                . ' stick to the conventions, or the update process could lead to unexpected'
-                . ' results and may be hazardous to your system'
-            );
-            $messages[] = $message;
+                    . ' stick to the conventions, or the update process could lead to unexpected'
+                    . ' results and may be hazardous to your system',
+                'Automatic TYPO3 CMS core update not possible: Folder structure has errors or warnings',
+                FlashMessage::ERROR
+            ));
         }
 
         // No core update on windows
         if (TYPO3_OS === 'WIN') {
             $success = false;
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(ErrorStatus::class);
-            $message->setTitle('Automatic TYPO3 CMS core update not possible: Update not supported on Windows OS');
-            $messages[] = $message;
+            $this->messages->enqueue(new FlashMessage(
+                '',
+                'Automatic TYPO3 CMS core update not possible: Update not supported on Windows OS',
+                FlashMessage::ERROR
+            ));
         }
 
         if ($success) {
@@ -199,11 +188,11 @@ class CoreUpdateService
             $result = @touch($file);
             if (!$result) {
                 $success = false;
-                /** @var $message StatusInterface */
-                $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                $message->setTitle('Automatic TYPO3 CMS core update not possible: No write access to document root');
-                $message->setMessage('Could not write a file in path "' . PATH_site . '"!');
-                $messages[] = $message;
+                $this->messages->enqueue(new FlashMessage(
+                    'Could not write a file in path "' . PATH_site . '"!',
+                    'Automatic TYPO3 CMS core update not possible: No write access to document root',
+                    FlashMessage::ERROR
+                ));
             } else {
                 unlink($file);
             }
@@ -215,13 +204,11 @@ class CoreUpdateService
                 $result = @touch($file);
                 if (!$result) {
                     $success = false;
-                    /** @var $message StatusInterface */
-                    $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $message->setTitle('Automatic TYPO3 CMS core update not possible: No write access to TYPO3 CMS core location');
-                    $message->setMessage(
-                        'New TYPO3 CMS core should be installed in "' . $coreLocation . '", but this directory is not writable!'
-                    );
-                    $messages[] = $message;
+                    $this->messages->enqueue(new FlashMessage(
+                        'New TYPO3 CMS core should be installed in "' . $coreLocation . '", but this directory is not writable!',
+                        'Automatic TYPO3 CMS core update not possible: No write access to TYPO3 CMS core location',
+                        FlashMessage::ERROR
+                    ));
                 } else {
                     unlink($file);
                 }
@@ -230,18 +217,15 @@ class CoreUpdateService
 
         if ($success && !$this->coreVersionService->isInstalledVersionAReleasedVersion()) {
             $success = false;
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(ErrorStatus::class);
-            $message->setTitle('Automatic TYPO3 CMS core update not possible: You are running a development version of TYPO3');
-            $message->setMessage(
+            $this->messages->enqueue(new FlashMessage(
                 'Your current version is specified as ' . $this->coreVersionService->getInstalledVersion() . '.'
-                . ' This is a development version and can not be updated automatically. If this is a "git"'
-                . ' checkout, please update using git directly.'
-            );
-            $messages[] = $message;
+                    . ' This is a development version and can not be updated automatically. If this is a "git"'
+                    . ' checkout, please update using git directly.',
+                'Automatic TYPO3 CMS core update not possible: You are running a development version of TYPO3',
+                FlashMessage::ERROR
+            ));
         }
 
-        $this->messages = $messages;
         return $success;
     }
 
@@ -253,49 +237,51 @@ class CoreUpdateService
      */
     public function downloadVersion($version)
     {
-        $messages = [];
         $success = true;
-
         if ($this->checkCoreFilesAvailable($version)) {
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(NoticeStatus::class);
-            $message->setTitle('Skipped download of TYPO3 CMS core. A core source directory already exists in destination path. Using this instead.');
-            $messages[] = $message;
+            $this->messages->enqueue(new FlashMessage(
+                '',
+                'Skipped download of TYPO3 CMS core. A core source directory already exists in destination path. Using this instead.',
+                FlashMessage::NOTICE
+            ));
         } else {
             $downloadUri = $this->downloadBaseUri . $version;
             $fileLocation = $this->getDownloadTarGzTargetPath($version);
 
             if (@file_exists($fileLocation)) {
                 $success = false;
-                /** @var $message StatusInterface */
-                $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                $message->setTitle('TYPO3 CMS core download exists in download location: ' . PathUtility::stripPathSitePrefix($this->downloadTargetPath));
-                $messages[] = $message;
+                $this->messages->enqueue(new FlashMessage(
+                    '',
+                    'TYPO3 CMS core download exists in download location: ' . PathUtility::stripPathSitePrefix($this->downloadTargetPath),
+                    FlashMessage::ERROR
+                ));
             } else {
                 $fileContent = GeneralUtility::getUrl($downloadUri);
                 if (!$fileContent) {
                     $success = false;
-                    /** @var $message StatusInterface */
-                    $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $message->setTitle('Download not successful');
-                    $messages[] = $message;
+                    $this->messages->enqueue(new FlashMessage(
+                        '',
+                        'Download not successful',
+                        FlashMessage::ERROR
+                    ));
                 } else {
                     $fileStoreResult = file_put_contents($fileLocation, $fileContent);
                     if (!$fileStoreResult) {
                         $success = false;
-                        /** @var $message StatusInterface */
-                        $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                        $message->setTitle('Unable to store download content');
-                        $messages[] = $message;
+                        $this->messages->enqueue(new FlashMessage(
+                            '',
+                            'Unable to store download content',
+                            FlashMessage::ERROR
+                        ));
                     } else {
-                        $message = GeneralUtility::makeInstance(OkStatus::class);
-                        $message->setTitle('TYPO3 CMS core download finished');
-                        $messages[] = $message;
+                        $this->messages->enqueue(new FlashMessage(
+                            '',
+                            'TYPO3 CMS core download finished'
+                        ));
                     }
                 }
             }
         }
-        $this->messages = $messages;
         return $success;
     }
 
@@ -307,46 +293,43 @@ class CoreUpdateService
      */
     public function verifyFileChecksum($version)
     {
-        $messages = [];
         $success = true;
-
         if ($this->checkCoreFilesAvailable($version)) {
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(WarningStatus::class);
-            $message->setTitle('Verifying existing TYPO3 CMS core checksum is not possible');
-            $messages[] = $message;
+            $this->messages->enqueue(new FlashMessage(
+                '',
+                'Verifying existing TYPO3 CMS core checksum is not possible',
+                FlashMessage::WARNING
+            ));
         } else {
             $fileLocation = $this->getDownloadTarGzTargetPath($version);
             $expectedChecksum = $this->coreVersionService->getTarGzSha1OfVersion($version);
-
             if (!file_exists($fileLocation)) {
                 $success = false;
-                /** @var $message StatusInterface */
-                $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                $message->setTitle('Downloaded TYPO3 CMS core not found');
-                $messages[] = $message;
+                $this->messages->enqueue(new FlashMessage(
+                    '',
+                    'Downloaded TYPO3 CMS core not found',
+                    FlashMessage::ERROR
+                ));
             } else {
                 $actualChecksum = sha1_file($fileLocation);
                 if ($actualChecksum !== $expectedChecksum) {
                     $success = false;
-                    /** @var $message StatusInterface */
-                    $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $message->setTitle('New TYPO3 CMS core checksum mismatch');
-                    $message->setMessage(
+                    $this->messages->enqueue(new FlashMessage(
                         'The official TYPO3 CMS version system on https://get.typo3.org expects a sha1 checksum of '
-                        . $expectedChecksum . ' from the content of the downloaded new TYPO3 CMS core version ' . $version . '.'
-                        . ' The actual checksum is ' . $actualChecksum . '. The update is stopped. This may be a'
-                        . ' failed download, an attack, or an issue with the typo3.org infrastructure.'
-                    );
-                    $messages[] = $message;
+                            . $expectedChecksum . ' from the content of the downloaded new TYPO3 CMS core version ' . $version . '.'
+                            . ' The actual checksum is ' . $actualChecksum . '. The update is stopped. This may be a'
+                            . ' failed download, an attack, or an issue with the typo3.org infrastructure.',
+                        'New TYPO3 CMS core checksum mismatch',
+                        FlashMessage::ERROR
+                    ));
                 } else {
-                    $message = GeneralUtility::makeInstance(OkStatus::class);
-                    $message->setTitle('Checksum verified');
-                    $messages[] = $message;
+                    $this->messages->enqueue(new FlashMessage(
+                        '',
+                        'Checksum verified'
+                    ));
                 }
             }
         }
-        $this->messages = $messages;
         return $success;
     }
 
@@ -358,55 +341,57 @@ class CoreUpdateService
      */
     public function unpackVersion($version)
     {
-        $messages = [];
         $success = true;
-
         if ($this->checkCoreFilesAvailable($version)) {
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(NoticeStatus::class);
-            $message->setTitle('Unpacking TYPO3 CMS core files skipped');
-            $messages[] = $message;
+            $this->messages->enqueue(new FlashMessage(
+                '',
+                'Unpacking TYPO3 CMS core files skipped',
+                FlashMessage::NOTICE
+            ));
         } else {
             $fileLocation = $this->downloadTargetPath . $version . '.tar.gz';
-
             if (!@is_file($fileLocation)) {
                 $success = false;
-                /** @var $message StatusInterface */
-                $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                $message->setTitle('Downloaded TYPO3 CMS core not found');
-                $messages[] = $message;
+                $this->messages->enqueue(new FlashMessage(
+                    '',
+                    'Downloaded TYPO3 CMS core not found',
+                    FlashMessage::ERROR
+                ));
             } elseif (@file_exists($this->downloadTargetPath . 'typo3_src-' . $version)) {
                 $success = false;
-                /** @var $message StatusInterface */
-                $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                $message->setTitle('Unpacked TYPO3 CMS core exists in download location: ' . PathUtility::stripPathSitePrefix($this->downloadTargetPath));
-                $messages[] = $message;
+                $this->messages->enqueue(new FlashMessage(
+                    '',
+                    'Unpacked TYPO3 CMS core exists in download location: ' . PathUtility::stripPathSitePrefix($this->downloadTargetPath),
+                    FlashMessage::ERROR
+                ));
             } else {
                 $unpackCommand = 'tar xf ' . escapeshellarg($fileLocation) . ' -C ' . escapeshellarg($this->downloadTargetPath) . ' 2>&1';
                 exec($unpackCommand, $output, $errorCode);
                 if ($errorCode) {
                     $success = false;
-                    /** @var $message StatusInterface */
-                    $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $message->setTitle('Unpacking TYPO3 CMS core not successful');
-                    $messages[] = $message;
+                    $this->messages->enqueue(new FlashMessage(
+                        '',
+                        'Unpacking TYPO3 CMS core not successful',
+                        FlashMessage::ERROR
+                    ));
                 } else {
                     $removePackedFileResult = unlink($fileLocation);
                     if (!$removePackedFileResult) {
                         $success = false;
-                        /** @var $message StatusInterface */
-                        $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                        $message->setTitle('Removing packed TYPO3 CMS core not successful');
-                        $messages[] = $message;
+                        $this->messages->enqueue(new FlashMessage(
+                            '',
+                            'Removing packed TYPO3 CMS core not successful',
+                            FlashMessage::ERROR
+                        ));
                     } else {
-                        $message = GeneralUtility::makeInstance(OkStatus::class);
-                        $message->setTitle('Unpacking TYPO3 CMS core successful');
-                        $messages[] = $message;
+                        $this->messages->enqueue(new FlashMessage(
+                            '',
+                            'Unpacking TYPO3 CMS core successful'
+                        ));
                     }
                 }
             }
         }
-        $this->messages = $messages;
         return $success;
     }
 
@@ -418,41 +403,41 @@ class CoreUpdateService
      */
     public function moveVersion($version)
     {
-        $messages = [];
         $success = true;
-
         if ($this->checkCoreFilesAvailable($version)) {
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(NoticeStatus::class);
-            $message->setTitle('Moving TYPO3 CMS core files skipped');
-            $messages[] = $message;
+            $this->messages->enqueue(new FlashMessage(
+                '',
+                'Moving TYPO3 CMS core files skipped',
+                FlashMessage::NOTICE
+            ));
         } else {
             $downloadedCoreLocation = $this->downloadTargetPath . 'typo3_src-' . $version;
             $newCoreLocation = @realpath($this->symlinkToCoreFiles . '/../') . '/typo3_src-' . $version;
 
             if (!@is_dir($downloadedCoreLocation)) {
                 $success = false;
-                /** @var $message StatusInterface */
-                $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                $message->setTitle('Unpacked TYPO3 CMS core not found');
-                $messages[] = $message;
+                $this->messages->enqueue(new FlashMessage(
+                    '',
+                    'Unpacked TYPO3 CMS core not found',
+                    FlashMessage::ERROR
+                ));
             } else {
                 $moveResult = rename($downloadedCoreLocation, $newCoreLocation);
                 if (!$moveResult) {
                     $success = false;
-                    /** @var $message StatusInterface */
-                    $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $message->setTitle('Moving TYPO3 CMS core to ' . $newCoreLocation . ' failed');
-                    $messages[] = $message;
+                    $this->messages->enqueue(new FlashMessage(
+                        '',
+                        'Moving TYPO3 CMS core to ' . $newCoreLocation . ' failed',
+                        FlashMessage::ERROR
+                    ));
                 } else {
-                    $message = GeneralUtility::makeInstance(OkStatus::class);
-                    $message->setTitle('Moved TYPO3 CMS core to final location');
-                    $messages[] = $message;
+                    $this->messages->enqueue(new FlashMessage(
+                        '',
+                        'Moved TYPO3 CMS core to final location'
+                    ));
                 }
             }
         }
-
-        $this->messages = $messages;
         return $success;
     }
 
@@ -465,31 +450,31 @@ class CoreUpdateService
     public function activateVersion($version)
     {
         $newCoreLocation = @realpath($this->symlinkToCoreFiles . '/../') . '/typo3_src-' . $version;
-
-        $messages = [];
         $success = true;
-
         if (!is_dir($newCoreLocation)) {
             $success = false;
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(ErrorStatus::class);
-            $message->setTitle('New TYPO3 CMS core not found');
-            $messages[] = $message;
+            $this->messages->enqueue(new FlashMessage(
+                '',
+                'New TYPO3 CMS core not found',
+                FlashMessage::ERROR
+            ));
         } elseif (!is_link($this->symlinkToCoreFiles)) {
             $success = false;
-            /** @var $message StatusInterface */
-            $message = GeneralUtility::makeInstance(ErrorStatus::class);
-            $message->setTitle('TYPO3 CMS core source directory (typo3_src) is not a link');
-            $messages[] = $message;
+            $this->messages->enqueue(new FlashMessage(
+                '',
+                'TYPO3 CMS core source directory (typo3_src) is not a link',
+                FlashMessage::ERROR
+            ));
         } else {
             $isCurrentCoreSymlinkAbsolute = PathUtility::isAbsolutePath(readlink($this->symlinkToCoreFiles));
             $unlinkResult = unlink($this->symlinkToCoreFiles);
             if (!$unlinkResult) {
                 $success = false;
-                /** @var $message StatusInterface */
-                $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                $message->setTitle('Removing old symlink failed');
-                $messages[] = $message;
+                $this->messages->enqueue(new FlashMessage(
+                    '',
+                    'Removing old symlink failed',
+                    FlashMessage::ERROR
+                ));
             } else {
                 if (!$isCurrentCoreSymlinkAbsolute) {
                     $newCoreLocation = $this->getRelativePath($newCoreLocation);
@@ -499,15 +484,14 @@ class CoreUpdateService
                     GeneralUtility::makeInstance(OpcodeCacheService::class)->clearAllActive();
                 } else {
                     $success = false;
-                    /** @var $message StatusInterface */
-                    $message = GeneralUtility::makeInstance(ErrorStatus::class);
-                    $message->setTitle('Linking new TYPO3 CMS core failed');
-                    $messages[] = $message;
+                    $this->messages->enqueue(new FlashMessage(
+                        '',
+                        'Linking new TYPO3 CMS core failed',
+                        FlashMessage::ERROR
+                    ));
                 }
             }
         }
-
-        $this->messages = $messages;
         return $success;
     }
 
index 753607e..cb5f72f 100644 (file)
@@ -16,9 +16,10 @@ namespace TYPO3\CMS\Install\Service;
  */
 
 use TYPO3\CMS\Core\Configuration\ConfigurationManager;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\OkStatus;
 
 /**
  * Service handling bulk read and write of LocalConfiguration values.
@@ -96,11 +97,11 @@ class LocalConfigurationValueService
      * Store changed values in LocalConfiguration
      *
      * @param array $valueList Nested array with key['key'] value
-     * @return array StatusInterface[]
+     * @return FlashMessageQueue
      */
-    public function updateLocalConfigurationValues(array $valueList): array
+    public function updateLocalConfigurationValues(array $valueList): FlashMessageQueue
     {
-        $statusObjects = [];
+        $messageQueue = new FlashMessageQueue('install');
         $configurationPathValuePairs = [];
         $commentArray = $this->getDefaultConfigArrayComments();
         $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
@@ -131,20 +132,21 @@ class LocalConfigurationValueService
             // Save if value changed
             if ($valueHasChanged) {
                 $configurationPathValuePairs[$path] = $value;
-                $status = GeneralUtility::makeInstance(OkStatus::class);
-                $status->setTitle($path);
                 if (is_bool($value)) {
-                    $status->setMessage('New value = ' . ($value ? 'true' : 'false'));
+                    $messageBody = 'New value = ' . ($value ? 'true' : 'false');
                 } else {
-                    $status->setMessage('New value = ' . $value);
+                    $messageBody = 'New value = ' . $value;
                 }
-                $statusObjects[] = $status;
+                $messageQueue->enqueue(new FlashMessage(
+                    $messageBody,
+                    $path
+                ));
             }
         }
-        if (!empty($statusObjects)) {
+        if (!empty($messageQueue)) {
             $configurationManager->setLocalConfigurationValuesByPathValuePairs($configurationPathValuePairs);
         }
-        return $statusObjects;
+        return $messageQueue;
     }
 
     /**
index de387b2..f158408 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Install\Service;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -306,9 +307,9 @@ class SessionService implements \TYPO3\CMS\Core\SingletonInterface
     /**
      * Add a message to "Flash" message storage.
      *
-     * @param \TYPO3\CMS\Install\Status\StatusInterface $message A message to add
+     * @param FlashMessage $message A message to add
      */
-    public function addMessage(\TYPO3\CMS\Install\Status\StatusInterface $message)
+    public function addMessage(FlashMessage $message)
     {
         if (!is_array($_SESSION['messages'])) {
             $_SESSION['messages'] = [];
@@ -319,7 +320,7 @@ class SessionService implements \TYPO3\CMS\Core\SingletonInterface
     /**
      * Return stored session messages and flush.
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface> Messages
+     * @return FlashMessage[] Messages
      */
     public function getMessagesAndFlush()
     {
index ac28e85..4610ea9 100644 (file)
@@ -21,10 +21,10 @@ use TYPO3\CMS\Core\Cache\DatabaseSchemaService;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
 use TYPO3\CMS\Core\Database\Schema\SqlReader;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Registry;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Status\ErrorStatus;
-use TYPO3\CMS\Install\Status\OkStatus;
 use TYPO3\CMS\Install\Updates\AbstractUpdate;
 use TYPO3\CMS\Install\Updates\RowUpdater\RowUpdaterInterface;
 
@@ -315,10 +315,10 @@ class UpgradeWizardsService
      *
      * @param string $identifier
      * @param array $postValues
-     * @return array StatusInterface[]
+     * @return FlashMessageQueue
      * @throws \RuntimeException
      */
-    public function executeWizard(string $identifier, array $postValues = []): array
+    public function executeWizard(string $identifier, array $postValues = []): FlashMessageQueue
     {
         if (empty($identifier)
             || !array_key_exists($identifier, $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'])
@@ -336,14 +336,15 @@ class UpgradeWizardsService
             'title' => $updateObject->getTitle(),
         ];
 
-        $messages = [];
+        $messages = new FlashMessageQueue('install');
         // $wizardInputErrorMessage is given as reference to wizard object!
         $wizardInputErrorMessage = '';
         if (method_exists($updateObject, 'checkUserInput') && !$updateObject->checkUserInput($wizardInputErrorMessage)) {
-            $message = new ErrorStatus();
-            $message->setTitle('Input parameter broken');
-            $message->setMessage($wizardInputErrorMessage ?: 'Something went wrong!');
-            $messages[] = $message;
+            $messages->enqueue(new FlashMessage(
+                $wizardInputErrorMessage ?: 'Something went wrong!',
+                'Input parameter broken',
+                FlashMessage::ERROR
+            ));
         } else {
             if (!method_exists($updateObject, 'performUpdate')) {
                 throw new \RuntimeException(
@@ -358,16 +359,16 @@ class UpgradeWizardsService
             $performResult = $updateObject->performUpdate($databaseQueries, $customOutput);
 
             if ($performResult) {
-                $message = new OkStatus();
-                $message->setTitle('Update successful');
-                $messages[] = $message;
+                $messages->enqueue(new FlashMessage(
+                    '',
+                    'Update successful'
+                ));
             } else {
-                $message = new ErrorStatus();
-                $message->setTitle('Update failed!');
-                if ($customOutput) {
-                    $message->setMessage($customOutput);
-                }
-                $messages[] = $message;
+                $messages->enqueue(new FlashMessage(
+                    $customOutput,
+                    'Update failed!',
+                    FlashMessage::ERROR
+                ));
             }
 
             if ($postValues['values']['showDatabaseQueries'] == 1) {
diff --git a/typo3/sysext/install/Classes/Status/AbstractStatus.php b/typo3/sysext/install/Classes/Status/AbstractStatus.php
deleted file mode 100644 (file)
index 4fc971d..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Abstract status
- */
-abstract class AbstractStatus implements StatusInterface
-{
-    /**
-     * @var string Severity
-     */
-    protected $severity = '';
-
-    /**
-     * @var int Severity as number
-     */
-    protected $severityNumber = -2;
-
-    /**
-     * @var string Title
-     */
-    protected $title = '';
-
-    /**
-     * @var string Status message
-     */
-    protected $message = '';
-
-    /**
-     * Default constructor creates severity number from severity string
-     */
-    public function __construct()
-    {
-        $this->severityNumber = $this->getSeverityAsNumber($this->severity);
-    }
-
-    /**
-     * @return string The severity
-     */
-    public function getSeverity(): string
-    {
-        return $this->severity;
-    }
-
-    /**
-     * @return int Severity as number
-     */
-    public function getSeverityNumber(): int
-    {
-        return $this->severityNumber;
-    }
-
-    /**
-     * @return string The title
-     */
-    public function getTitle(): string
-    {
-        return $this->title;
-    }
-
-    /**
-     * Set title
-     *
-     * @param string $title The title
-     */
-    public function setTitle(string $title)
-    {
-        $this->title = $title;
-    }
-
-    /**
-     * Get status message
-     *
-     * @return string Status message
-     */
-    public function getMessage(): string
-    {
-        return $this->message;
-    }
-
-    /**
-     * Set status message
-     *
-     * @param string $message Status message
-     */
-    public function setMessage(string $message)
-    {
-        $this->message = $message;
-    }
-
-    /**
-     * @return array Json representation of this status
-     */
-    public function jsonSerialize(): array
-    {
-        return [
-            'severity' => $this->getSeverityNumber(),
-            'title' => $this->getTitle(),
-            'message' => $this->getMessage(),
-        ];
-    }
-
-    /**
-     * Return the corresponding integer value for given severity string
-     *
-     * @param string $severity
-     * @return int
-     */
-    protected function getSeverityAsNumber($severity): int
-    {
-        $number = -2;
-        switch (strtolower($severity)) {
-            case 'loading':
-                $number = -3;
-                break;
-            case 'notice':
-                $number = -2;
-                break;
-            case 'info':
-                $number = -1;
-                break;
-            case 'ok':
-            case 'success':
-                $number = 0;
-                break;
-            case 'warning':
-                $number = 1;
-                break;
-            case 'error':
-            case 'danger':
-            case 'alert':
-            case 'fatal':
-                $number = 2;
-                break;
-        }
-        return $number;
-    }
-}
diff --git a/typo3/sysext/install/Classes/Status/AlertStatus.php b/typo3/sysext/install/Classes/Status/AlertStatus.php
deleted file mode 100644 (file)
index 37817ad..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Alert level status
- */
-class AlertStatus extends AbstractStatus implements StatusInterface
-{
-    /**
-     * @var string The severity
-     */
-    protected $severity = 'alert';
-}
diff --git a/typo3/sysext/install/Classes/Status/ErrorStatus.php b/typo3/sysext/install/Classes/Status/ErrorStatus.php
deleted file mode 100644 (file)
index 3a7978a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Error level status
- */
-class ErrorStatus extends AbstractStatus implements StatusInterface
-{
-    /**
-     * @var string The severity
-     */
-    protected $severity = 'error';
-}
diff --git a/typo3/sysext/install/Classes/Status/Exception.php b/typo3/sysext/install/Classes/Status/Exception.php
deleted file mode 100644 (file)
index a519204..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * A status exception
- */
-class Exception extends \TYPO3\CMS\Install\Exception
-{
-}
diff --git a/typo3/sysext/install/Classes/Status/InfoStatus.php b/typo3/sysext/install/Classes/Status/InfoStatus.php
deleted file mode 100644 (file)
index e717136..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Info level status
- */
-class InfoStatus extends AbstractStatus implements StatusInterface
-{
-    /**
-     * @var string The severity
-     */
-    protected $severity = 'information';
-}
diff --git a/typo3/sysext/install/Classes/Status/LoadingStatus.php b/typo3/sysext/install/Classes/Status/LoadingStatus.php
deleted file mode 100644 (file)
index 86013af..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Loading level status - Used in Extension compatibility tester
- */
-class LoadingStatus extends AbstractStatus implements StatusInterface
-{
-    /**
-     * @var string The severity
-     */
-    protected $severity = 'loading';
-}
diff --git a/typo3/sysext/install/Classes/Status/NoticeStatus.php b/typo3/sysext/install/Classes/Status/NoticeStatus.php
deleted file mode 100644 (file)
index 8f7a3d9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Notice level status
- */
-class NoticeStatus extends AbstractStatus implements StatusInterface
-{
-    /**
-     * @var string The severity
-     */
-    protected $severity = 'notice';
-}
diff --git a/typo3/sysext/install/Classes/Status/OkStatus.php b/typo3/sysext/install/Classes/Status/OkStatus.php
deleted file mode 100644 (file)
index 04db84c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Ok level status
- */
-class OkStatus extends AbstractStatus implements StatusInterface
-{
-    /**
-     * @var string The severity
-     */
-    protected $severity = 'ok';
-}
diff --git a/typo3/sysext/install/Classes/Status/StatusInterface.php b/typo3/sysext/install/Classes/Status/StatusInterface.php
deleted file mode 100644 (file)
index 9635a73..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Status interface
- */
-interface StatusInterface extends \JsonSerializable
-{
-    /**
-     * Get severity
-     *
-     * @return string The severity
-     */
-    public function getSeverity(): string;
-
-    /**
-     * Get severity as integer
-     *
-     * @return int The severity as int
-     */
-    public function getSeverityNumber(): int;
-
-    /**
-     * Get title
-     *
-     * @return string The title
-     */
-    public function getTitle(): string;
-
-    /**
-     * Set title
-     *
-     * @param string $title The title
-     */
-    public function setTitle(string $title);
-
-    /**
-     * Get status message
-     *
-     * @return string Status message
-     */
-    public function getMessage(): string;
-
-    /**
-     * Set status message
-     *
-     * @param string $message Status message
-     */
-    public function setMessage(string $message);
-}
diff --git a/typo3/sysext/install/Classes/Status/StatusUtility.php b/typo3/sysext/install/Classes/Status/StatusUtility.php
deleted file mode 100644 (file)
index ffd2b08..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Utility methods to handle status objects. Provides some helper
- * methods to filter, sort and render status objects.
- */
-class StatusUtility
-{
-    /**
-     * Order status objects by severity
-     *
-     * @param StatusInterface[] $statusObjects Status objects in random order
-     * @return array With sub arrays by severity
-     * @throws Exception
-     */
-    public function sortBySeverity(array $statusObjects = []): array
-    {
-        $orderedStatus = [
-            'alert' => $this->filterBySeverity($statusObjects, 'alert'),
-            'error' => $this->filterBySeverity($statusObjects, 'error'),
-            'warning' => $this->filterBySeverity($statusObjects, 'warning'),
-            'ok' => $this->filterBySeverity($statusObjects, 'ok'),
-            'information' => $this->filterBySeverity($statusObjects, 'information'),
-            'notice' => $this->filterBySeverity($statusObjects, 'notice'),
-        ];
-        return $orderedStatus;
-    }
-
-    /**
-     * Filter a list of status objects by severity
-     *
-     * @param StatusInterface[] $statusObjects Given list of status objects
-     * @param string $severity Severity identifier
-     * @throws Exception
-     * @return array List of status objects with given severity
-     */
-    public function filterBySeverity(array $statusObjects = [], $severity = 'ok'): array
-    {
-        $filteredObjects = [];
-        foreach ($statusObjects as $status) {
-            if (!$status instanceof StatusInterface) {
-                throw new Exception(
-                    'Object must implement StatusInterface',
-                    1366919442
-                );
-            }
-            if ($status->getSeverity() === $severity) {
-                $filteredObjects[] = $status;
-            }
-        }
-        return $filteredObjects;
-    }
-}
diff --git a/typo3/sysext/install/Classes/Status/WarningStatus.php b/typo3/sysext/install/Classes/Status/WarningStatus.php
deleted file mode 100644 (file)
index d2115e6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Status;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Warning level status
- */
-class WarningStatus extends AbstractStatus implements StatusInterface
-{
-    /**
-     * @var string The severity
-     */
-    protected $severity = 'warning';
-}
index 2f2d1ed..dfbe9f5 100644 (file)
@@ -14,7 +14,8 @@ namespace TYPO3\CMS\Install\SystemEnvironment;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Install\Status;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 
 /**
  * Check system environment status
@@ -47,6 +48,11 @@ use TYPO3\CMS\Install\Status;
 class Check implements CheckInterface
 {
     /**
+     * @var FlashMessageQueue
+     */
+    protected $messageQueue;
+
+    /**
      * @var array List of required PHP extensions
      */
     protected $requiredPhpExtensions = [
@@ -68,58 +74,44 @@ class Check implements CheckInterface
     /**
      * Get all status information as array with status objects
      *
-     * @return array<\TYPO3\CMS\Install\Status\StatusInterface>
+     * @return FlashMessageQueue
      */
-    public function getStatus(): array
+    public function getStatus(): FlashMessageQueue
     {
-        $status = [];
-        $status[] = $this->checkCurrentDirectoryIsInIncludePath();
-        $status[] = $this->checkFileUploadEnabled();
-        $status[] = $this->checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize();
-        $status[] = $this->checkMemorySettings();
-        $status[] = $this->checkPhpVersion();
-        $status[] = $this->checkMaxExecutionTime();
-        $status[] = $this->checkDisableFunctions();
-        $status[] = $this->checkMysqliReconnectSetting();
-        $status[] = $this->checkDocRoot();
-        $status[] = $this->checkOpenBaseDir();
-        $status[] = $this->checkXdebugMaxNestingLevel();
-        $status[] = $this->checkOpenSslInstalled();
-
-        if ($this->isSuhosinLoadedAndActive()) {
-            $status[] = $this->getSuhosinLoadedStatus();
-            $status[] = $this->checkSuhosinRequestMaxVars();
-            $status[] = $this->checkSuhosinRequestMaxVarnameLength();
-            $status[] = $this->checkSuhosinPostMaxNameLength();
-            $status[] = $this->checkSuhosinPostMaxVars();
-            $status[] = $this->checkSuhosinGetMaxNameLength();
-            $status[] = $this->checkSuhosinGetMaxValueLength();
-            $status[] = $this->checkSuhosinExecutorIncludeWhiteListContainsPhar();
-            $status[] = $this->checkSuhosinExecutorIncludeWhiteListContainsVfs();
-        }
+        $this->messageQueue = new FlashMessageQueue('install');
+        $this->checkCurrentDirectoryIsInIncludePath();
+        $this->checkFileUploadEnabled();
+        $this->checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize();
+        $this->checkMemorySettings();
+        $this->checkPhpVersion();
+        $this->checkMaxExecutionTime();
+        $this->checkDisableFunctions();
+        $this->checkMysqliReconnectSetting();
+        $this->checkDocRoot();
+        $this->checkOpenBaseDir();
+        $this->checkXdebugMaxNestingLevel();
+        $this->checkOpenSslInstalled();
 
-        $status[] = $this->checkMaxInputVars();
-        $status[] = $this->checkReflectionDocComment();
-        $status[] = $this->checkWindowsApacheThreadStackSize();
+        $this->checkMaxInputVars();
+        $this->checkReflectionDocComment();
+        $this->checkWindowsApacheThreadStackSize();
 
         foreach ($this->requiredPhpExtensions as $extension) {
-            $status[] = $this->checkRequiredPhpExtension($extension);
+            $this->checkRequiredPhpExtension($extension);
         }
 
-        $status[] = $this->checkPcreVersion();
-        $status[] = $this->checkGdLibTrueColorSupport();
-        $status[] = $this->checkGdLibGifSupport();
-        $status[] = $this->checkGdLibJpgSupport();
-        $status[] = $this->checkGdLibPngSupport();
-        $status[] = $this->checkGdLibFreeTypeSupport();
+        $this->checkPcreVersion();
+        $this->checkGdLibTrueColorSupport();
+        $this->checkGdLibGifSupport();
+        $this->checkGdLibJpgSupport();
+        $this->checkGdLibPngSupport();
+        $this->checkGdLibFreeTypeSupport();
 
-        return $status;
+        return $this->messageQueue;
     }
 
     /**
      * Checks if current directory (.) is in PHP include path
-     *
-     * @return Status\StatusInterface
      */
     protected function checkCurrentDirectoryIsInIncludePath()
     {
@@ -127,78 +119,74 @@ class Check implements CheckInterface
         $delimiter = $this->isWindowsOs() ? ';' : ':';
         $pathArray = $this->trimExplode($delimiter, $includePath);
         if (!in_array('.', $pathArray)) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('Current directory (./) is not within PHP include path');
-            $status->setMessage(
-                'include_path = ' . implode(' ', $pathArray) . LF .
-                'Normally the current path \'.\' is included in the' .
-                ' include_path of PHP. Although TYPO3 does not rely on this,' .
-                ' it is an unusual setting that may introduce problems for' .
-                ' some extensions.'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'include_path = ' . implode(' ', $pathArray) . LF
+                    . 'Normally the current path \'.\' is included in the'
+                    . ' include_path of PHP. Although TYPO3 does not rely on this,'
+                    . ' it is an unusual setting that may introduce problems for'
+                    . ' some extensions.',
+                'Current directory (./) is not within PHP include path',
+                FlashMessage::WARNING
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('Current directory (./) is within PHP include path.');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'Current directory (./) is within PHP include path.'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check if file uploads are enabled in PHP
-     *
-     * @return Status\StatusInterface
      */
     protected function checkFileUploadEnabled()
     {
         if (!ini_get('file_uploads')) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('File uploads not allowed in PHP');
-            $status->setMessage(
-                'file_uploads=' . ini_get('file_uploads') . LF .
-                'TYPO3 uses the ability to upload files from the browser in various cases.' .
-                ' If this flag is disabled in PHP, you won\'t be able to upload files.' .
-                ' But it doesn\'t end here, because not only are files not accepted by' .
-                ' the server - ALL content in the forms are discarded and therefore' .
-                ' nothing at all will be editable if you don\'t set this flag!'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'file_uploads=' . ini_get('file_uploads') . LF
+                    . 'TYPO3 uses the ability to upload files from the browser in various cases.'
+                    . ' If this flag is disabled in PHP, you won\'t be able to upload files.'
+                    . ' But it doesn\'t end here, because not only are files not accepted by'
+                    . ' the server - ALL content in the forms are discarded and therefore'
+                    . ' nothing at all will be editable if you don\'t set this flag!',
+                'File uploads not allowed in PHP',
+                FlashMessage::ERROR
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('File uploads allowed in PHP');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'File uploads allowed in PHP'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check maximum post upload size correlates with maximum file upload
-     *
-     * @return Status\StatusInterface
      */
     protected function checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize()
     {
         $maximumUploadFilesize = $this->getBytesFromSizeMeasurement(ini_get('upload_max_filesize'));
         $maximumPostSize = $this->getBytesFromSizeMeasurement(ini_get('post_max_size'));
         if ($maximumPostSize > 0 && $maximumPostSize < $maximumUploadFilesize) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('Maximum size for POST requests is smaller than maximum upload filesize in PHP');
-            $status->setMessage(
-                'upload_max_filesize=' . ini_get('upload_max_filesize') . LF .
-                'post_max_size=' . ini_get('post_max_size') . LF .
-                'You have defined a maximum size for file uploads in PHP which' .
-                ' exceeds the allowed size for POST requests. Therefore the' .
-                ' file uploads can also not be larger than ' . ini_get('post_max_size') . '.'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'upload_max_filesize=' . ini_get('upload_max_filesize') . LF
+                    . 'post_max_size=' . ini_get('post_max_size') . LF
+                    . 'You have defined a maximum size for file uploads in PHP which'
+                    . ' exceeds the allowed size for POST requests. Therefore the'
+                    . ' file uploads can also not be larger than ' . ini_get('post_max_size') . '.',
+                'Maximum size for POST requests is smaller than maximum upload filesize in PHP',
+                FlashMessage::ERROR
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('Maximum post upload size correlates with maximum upload file size in PHP');
-            $status->setMessage('The maximum size for file uploads is actually set to ' . ini_get('post_max_size'));
+            $this->messageQueue->enqueue(new FlashMessage(
+                'The maximum size for file uploads is actually set to ' . ini_get('post_max_size'),
+                'Maximum post upload size correlates with maximum upload file size in PHP'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check memory settings
-     *
-     * @return Status\StatusInterface
      */
     protected function checkMemorySettings()
     {
@@ -206,106 +194,103 @@ class Check implements CheckInterface
         $recommendedMemoryLimit = 128;
         $memoryLimit = $this->getBytesFromSizeMeasurement(ini_get('memory_limit'));
         if ($memoryLimit <= 0) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('Unlimited memory limit for PHP');
-            $status->setMessage(
-                'PHP is configured not to limit memory usage at all. This is a risk' .
-                ' and should be avoided in production setup. In general it\'s best practice to limit this.' .
-                ' To be safe, set a limit in PHP, but with a minimum of ' . $recommendedMemoryLimit . 'MB:' . LF .
-                'memory_limit=' . $recommendedMemoryLimit . 'M'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'PHP is configured not to limit memory usage at all. This is a risk'
+                    . ' and should be avoided in production setup. In general it\'s best practice to limit this.'
+                    . ' To be safe, set a limit in PHP, but with a minimum of ' . $recommendedMemoryLimit . 'MB:' . LF
+                    . 'memory_limit=' . $recommendedMemoryLimit . 'M',
+                'Unlimited memory limit for PHP',
+                FlashMessage::WARNING
+            ));
         } elseif ($memoryLimit < 1024 * 1024 * $minimumMemoryLimit) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('PHP Memory limit below ' . $minimumMemoryLimit . 'MB');
-            $status->setMessage(
-                'memory_limit=' . ini_get('memory_limit') . LF .
-                'Your system is configured to enforce a memory limit for PHP scripts lower than ' .
-                $minimumMemoryLimit . 'MB. It is required to raise the limit.' .
-                ' We recommend a minimum PHP memory limit of ' . $recommendedMemoryLimit . 'MB:' . LF .
-                'memory_limit=' . $recommendedMemoryLimit . 'M'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'memory_limit=' . ini_get('memory_limit') . LF
+                    . 'Your system is configured to enforce a memory limit for PHP scripts lower than '
+                    . $minimumMemoryLimit . 'MB. It is required to raise the limit.'
+                    . ' We recommend a minimum PHP memory limit of ' . $recommendedMemoryLimit . 'MB:' . LF
+                    . 'memory_limit=' . $recommendedMemoryLimit . 'M',
+                'PHP Memory limit below ' . $minimumMemoryLimit . 'MB',
+                FlashMessage::ERROR
+            ));
         } elseif ($memoryLimit < 1024 * 1024 * $recommendedMemoryLimit) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('PHP Memory limit below ' . $recommendedMemoryLimit . 'MB');
-            $status->setMessage(
-                'memory_limit=' . ini_get('memory_limit') . LF .
-                'Your system is configured to enforce a memory limit for PHP scripts lower than ' .
-                $recommendedMemoryLimit . 'MB.' .
-                ' A slim TYPO3 instance without many extensions will probably work, but you should monitor your' .
-                ' system for "allowed memory size of X bytes exhausted" messages, especially if using the backend.' .
-                ' To be on the safe side,' . ' we recommend a minimum PHP memory limit of ' .
-                $recommendedMemoryLimit . 'MB:' . LF .
-                'memory_limit=' . $recommendedMemoryLimit . 'M'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'memory_limit=' . ini_get('memory_limit') . LF
+                    . 'Your system is configured to enforce a memory limit for PHP scripts lower than '
+                    . $recommendedMemoryLimit . 'MB.'
+                    . ' A slim TYPO3 instance without many extensions will probably work, but you should monitor your'
+                    . ' system for "allowed memory size of X bytes exhausted" messages, especially if using the backend.'
+                    . ' To be on the safe side,' . ' we recommend a minimum PHP memory limit of '
+                    . $recommendedMemoryLimit . 'MB:' . LF
+                    . 'memory_limit=' . $recommendedMemoryLimit . 'M',
+                'PHP Memory limit below ' . $recommendedMemoryLimit . 'MB',
+                FlashMessage::WARNING
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP Memory limit is equal to or more than ' . $recommendedMemoryLimit . 'MB');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'PHP Memory limit is equal to or more than ' . $recommendedMemoryLimit . 'MB'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check minimum PHP version
-     *
-     * @return Status\StatusInterface
      */
     protected function checkPhpVersion()
     {
         $minimumPhpVersion = '7.0.0';
         $currentPhpVersion = phpversion();
         if (version_compare($currentPhpVersion, $minimumPhpVersion) < 0) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('PHP version too low');
-            $status->setMessage(
-                'Your PHP version ' . $currentPhpVersion . ' is too old. TYPO3 CMS does not run' .
-                ' with this version. Update to at least PHP ' . $minimumPhpVersion
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'Your PHP version ' . $currentPhpVersion . ' is too old. TYPO3 CMS does not run'
+                    . ' with this version. Update to at least PHP ' . $minimumPhpVersion,
+                'PHP version too low',
+                FlashMessage::ERROR
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP version is fine');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'PHP version is fine'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check PRCE module is loaded and minimum version
-     *
-     * @return Status\StatusInterface
      */
     protected function checkPcreVersion()
     {
         $minimumPcreVersion = '8.38';
         if (!extension_loaded('pcre')) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('PHP extension pcre not loaded');
-            $status->setMessage(
-                'TYPO3 CMS uses PHP extension pcre but it is not loaded' .
-                ' in your environment. Change your environment to provide this extension' .
-                ' in with minimum version ' . $minimumPcreVersion . '.'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'TYPO3 CMS uses PHP extension pcre but it is not loaded'
+                    . ' in your environment. Change your environment to provide this extension'
+                    . ' in with minimum version ' . $minimumPcreVersion . '.',
+                'PHP extension pcre not loaded',
+                FlashMessage::ERROR
+            ));
         } else {
             $installedPcreVersionString = trim(PCRE_VERSION); // '8.39 2016-06-14'
             $mainPcreVersionString = explode(' ', $installedPcreVersionString);
             $mainPcreVersionString = $mainPcreVersionString[0]; // '8.39'
             if (version_compare($mainPcreVersionString, $minimumPcreVersion) < 0) {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PCRE version too low');
-                $status->setMessage(
-                    'Your PCRE version ' . PCRE_VERSION . ' is too old. TYPO3 CMS may trigger PHP segmentantion' .
-                    ' faults with this version. Update to at least PCRE ' . $minimumPcreVersion
-                );
+                $this->messageQueue->enqueue(new FlashMessage(
+                    'Your PCRE version ' . PCRE_VERSION . ' is too old. TYPO3 CMS may trigger PHP segmentantion'
+                        . ' faults with this version. Update to at least PCRE ' . $minimumPcreVersion,
+                    'PCRE version too low',
+                    FlashMessage::ERROR
+                ));
             } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP extension PCRE is loaded and version is fine');
+                $this->messageQueue->enqueue(new FlashMessage(
+                    '',
+                    'PHP extension PCRE is loaded and version is fine'
+                ));
             }
         }
-        return $status;
     }
 
     /**
      * Check maximum execution time
-     *
-     * @return Status\StatusInterface
      */
     protected function checkMaxExecutionTime()
     {
@@ -313,48 +298,46 @@ class Check implements CheckInterface
         $recommendedMaximumExecutionTime = 240;
         $currentMaximumExecutionTime = ini_get('max_execution_time');
         if ($currentMaximumExecutionTime == 0) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('Infinite PHP script execution time');
-            $status->setMessage(
-                'max_execution_time=0' . LF .
-                'While TYPO3 is fine with this, you risk a denial-of-service for your system if for whatever' .
-                ' reason some script hangs in an infinite loop. You are usually on the safe side ' .
-                ' if it is reduced to ' . $recommendedMaximumExecutionTime . ' seconds:' . LF .
-                'max_execution_time=' . $recommendedMaximumExecutionTime
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'max_execution_time=0' . LF
+                    . 'While TYPO3 is fine with this, you risk a denial-of-service for your system if for whatever'
+                    . ' reason some script hangs in an infinite loop. You are usually on the safe side '
+                    . ' if it is reduced to ' . $recommendedMaximumExecutionTime . ' seconds:' . LF
+                    . 'max_execution_time=' . $recommendedMaximumExecutionTime,
+                'Infinite PHP script execution time',
+                FlashMessage::WARNING
+            ));
         } elseif ($currentMaximumExecutionTime < $minimumMaximumExecutionTime) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('Low PHP script execution time');
-            $status->setMessage(
-                'max_execution_time=' . $currentMaximumExecutionTime . LF .
-                'Your max_execution_time is too low. Some expensive operations in TYPO3 can take longer than that.' .
-                ' It is recommended to raise the limit to ' . $recommendedMaximumExecutionTime . ' seconds:' . LF .
-                'max_execution_time=' . $recommendedMaximumExecutionTime
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'max_execution_time=' . $currentMaximumExecutionTime . LF
+                    . 'Your max_execution_time is too low. Some expensive operations in TYPO3 can take longer than that.'
+                    . ' It is recommended to raise the limit to ' . $recommendedMaximumExecutionTime . ' seconds:' . LF
+                    . 'max_execution_time=' . $recommendedMaximumExecutionTime,
+                'Low PHP script execution time',
+                FlashMessage::ERROR
+            ));
         } elseif ($currentMaximumExecutionTime < $recommendedMaximumExecutionTime) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('Low PHP script execution time');
-            $status->setMessage(
-                'max_execution_time=' . $currentMaximumExecutionTime . LF .
-                'Your max_execution_time is low. While TYPO3 often runs without problems' .
-                ' with ' . $minimumMaximumExecutionTime . ' seconds,' .
-                ' it may still happen that script execution is stopped before finishing' .
-                ' calculations. You should monitor the system for messages in this area' .
-                ' and maybe raise the limit to ' . $recommendedMaximumExecutionTime . ' seconds:' . LF .
-                'max_execution_time=' . $recommendedMaximumExecutionTime
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'max_execution_time=' . $currentMaximumExecutionTime . LF
+                    . 'Your max_execution_time is low. While TYPO3 often runs without problems'
+                    . ' with ' . $minimumMaximumExecutionTime . ' seconds,'
+                    . ' it may still happen that script execution is stopped before finishing'
+                    . ' calculations. You should monitor the system for messages in this area'
+                    . ' and maybe raise the limit to ' . $recommendedMaximumExecutionTime . ' seconds:' . LF
+                    . 'max_execution_time=' . $recommendedMaximumExecutionTime,
+                'Low PHP script execution time',
+                FlashMessage::WARNING
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('Maximum PHP script execution time is equal to or more than '
-                . $recommendedMaximumExecutionTime);
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'Maximum PHP script execution time is equal to or more than ' . $recommendedMaximumExecutionTime
+            ));
         }
-        return $status;
     }
 
     /**
      * Check for disabled functions
-     *
-     * @return Status\StatusInterface
      */
     protected function checkDisableFunctions()
     {
@@ -378,111 +361,106 @@ class Check implements CheckInterface
 
         if ($disabledFunctions !== '') {
             if (!empty($disabledFunctionsArray)) {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('Some PHP functions disabled');
-                $status->setMessage(
-                    'disable_functions=' . implode(' ', explode(',', $disabledFunctions)) . LF .
-                    'These function(s) are disabled. TYPO3 uses some of those, so there might be trouble.' .
-                    ' TYPO3 is designed to use the default set of PHP functions plus some common extensions.' .
-                    ' Possibly these functions are disabled' .
-                    ' due to security considerations and most likely the list would include a function like' .
-                    ' exec() which is used by TYPO3 at various places. Depending on which exact functions' .
-                    ' are disabled, some parts of the system may just break without further notice.'
-                );
+                $this->messageQueue->enqueue(new FlashMessage(
+                    'disable_functions=' . implode(' ', explode(',', $disabledFunctions)) . LF
+                        . 'These function(s) are disabled. TYPO3 uses some of those, so there might be trouble.'
+                        . ' TYPO3 is designed to use the default set of PHP functions plus some common extensions.'
+                        . ' Possibly these functions are disabled'
+                        . ' due to security considerations and most likely the list would include a function like'
+                        . ' exec() which is used by TYPO3 at various places. Depending on which exact functions'
+                        . ' are disabled, some parts of the system may just break without further notice.',
+                    'Some PHP functions disabled',
+                    FlashMessage::ERROR
+                ));
             } else {
-                $status = new Status\NoticeStatus();
-                $status->setTitle('Some PHP functions currently disabled but OK');
-                $status->setMessage(
-                    'disable_functions=' . implode(' ', explode(',', $disabledFunctions)) . LF .
-                    'These function(s) are disabled. TYPO3 uses currently none of those, so you are good to go.'
-                );
+                $this->messageQueue->enqueue(new FlashMessage(
+                    'disable_functions=' . implode(' ', explode(',', $disabledFunctions)) . LF
+                        . 'These function(s) are disabled. TYPO3 uses currently none of those, so you are good to go.',
+                    'Some PHP functions currently disabled but OK'
+                ));
             }
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('No disabled PHP functions');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'No disabled PHP functions'
+            ));
         }
-        return $status;
     }
 
     /**
      * Verify that mysqli.reconnect is set to 0 in order to avoid improper reconnects
-     *
-     * @return Status\StatusInterface
      */
     protected function checkMysqliReconnectSetting()
     {
         $currentMysqliReconnectSetting = ini_get('mysqli.reconnect');
         if ($currentMysqliReconnectSetting === '1') {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('PHP mysqli.reconnect is enabled');
-            $status->setMessage(
-                'mysqli.reconnect=1' . LF .
-                'PHP is configured to automatically reconnect the database connection on disconnection.' . LF .
-                ' Warning: If (e.g. during a long-running task) the connection is dropped and automatically reconnected, ' .
-                ' it may not be reinitialized properly (e.g. charset) and write mangled data to the database!'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'mysqli.reconnect=1' . LF
+                    . 'PHP is configured to automatically reconnect the database connection on disconnection.' . LF
+                    . ' Warning: If (e.g. during a long-running task) the connection is dropped and automatically reconnected, '
+                    . ' it may not be reinitialized properly (e.g. charset) and write mangled data to the database!',
+                'PHP mysqli.reconnect is enabled',
+                FlashMessage::ERROR
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP mysqli.reconnect is fine');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'PHP mysqli.reconnect is fine'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check for doc_root ini setting
-     *
-     * @return Status\StatusInterface
      */
     protected function checkDocRoot()
     {
         $docRootSetting = trim(ini_get('doc_root'));
         if ($docRootSetting !== '') {
-            $status = new Status\NoticeStatus();
-            $status->setTitle('doc_root is set');
-            $status->setMessage(
-                'doc_root=' . $docRootSetting . LF .
-                'PHP cannot execute scripts' .
-                ' outside this directory. This setting is seldom used and must correlate' .
-                ' with your actual document root. You might be in trouble if your' .
-                ' TYPO3 CMS core code is linked to some different location.' .
-                ' If that is a problem, the setting must be changed.'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'doc_root=' . $docRootSetting . LF
+                    . 'PHP cannot execute scripts'
+                    . ' outside this directory. This setting is seldom used and must correlate'
+                    . ' with your actual document root. You might be in trouble if your'
+                    . ' TYPO3 CMS core code is linked to some different location.'
+                    . ' If that is a problem, the setting must be changed.',
+                'doc_root is set',
+                FlashMessage::NOTICE
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP doc_root is not set');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'PHP doc_root is not set'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check open_basedir
-     *
-     * @return Status\StatusInterface
      */
     protected function checkOpenBaseDir()
     {
         $openBaseDirSetting = trim(ini_get('open_basedir'));
         if ($openBaseDirSetting !== '') {
-            $status = new Status\NoticeStatus();
-            $status->setTitle('PHP open_basedir is set');
-            $status->setMessage(
-                'open_basedir = ' . ini_get('open_basedir') . LF .
-                'This restricts TYPO3 to open and include files only in this' .
-                ' path. Please make sure that this does not prevent TYPO3 from running,' .
-                ' if for example your TYPO3 CMS core is linked to a different directory' .
-                ' not included in this path.'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'open_basedir = ' . ini_get('open_basedir') . LF
+                    . 'This restricts TYPO3 to open and include files only in this'
+                    . ' path. Please make sure that this does not prevent TYPO3 from running,'
+                    . ' if for example your TYPO3 CMS core is linked to a different directory'
+                    . ' not included in this path.',
+                'PHP open_basedir is set',
+                FlashMessage::NOTICE
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP open_basedir is off');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'PHP open_basedir is off'
+            ));
         }
-        return $status;
     }
 
     /**
      * If xdebug is loaded, the default max_nesting_level of 100 must be raised
-     *
-     * @return Status\StatusInterface
      */
     protected function checkXdebugMaxNestingLevel()
     {
@@ -491,43 +469,44 @@ class Check implements CheckInterface
             $errorThreshold = 250;
             $currentMaxNestingLevel = ini_get('xdebug.max_nesting_level');
             if ($currentMaxNestingLevel < $errorThreshold) {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP xdebug.max_nesting_level is critically low');
-                $status->setMessage(
-                    'xdebug.max_nesting_level=' . $currentMaxNestingLevel . LF .
-                    'This setting controls the maximum number of nested function calls to protect against' .
-                    ' infinite recursion. The current value is too low for TYPO3 CMS and must' .
-                    ' be either raised or xdebug has to be unloaded. A value of ' . $recommendedMaxNestingLevel .
-                    ' is recommended. Warning: Expect fatal PHP errors in central parts of the CMS' .
-                    ' if the value is not raised significantly to:' . LF .
-                    'xdebug.max_nesting_level=' . $recommendedMaxNestingLevel
-                );
+                $this->messageQueue->enqueue(new FlashMessage(
+                    'xdebug.max_nesting_level=' . $currentMaxNestingLevel . LF
+                        . 'This setting controls the maximum number of nested function calls to protect against'
+                        . ' infinite recursion. The current value is too low for TYPO3 CMS and must'
+                        . ' be either raised or xdebug has to be unloaded. A value of ' . $recommendedMaxNestingLevel
+                        . ' is recommended. Warning: Expect fatal PHP errors in central parts of the CMS'
+                        . ' if the value is not raised significantly to:' . LF
+                        . 'xdebug.max_nesting_level=' . $recommendedMaxNestingLevel,
+                    'PHP xdebug.max_nesting_level is critically low',
+                    FlashMessage::ERROR
+                ));
             } elseif ($currentMaxNestingLevel < $recommendedMaxNestingLevel) {
-                $status = new Status\WarningStatus();
-                $status->setTitle('PHP xdebug.max_nesting_level is low');
-                $status->setMessage(
-                    'xdebug.max_nesting_level=' . $currentMaxNestingLevel . LF .
-                    'This setting controls the maximum number of nested function calls to protect against' .
-                    ' infinite recursion. The current value is high enough for the TYPO3 CMS core to work' .
-                    ' fine, but still some extensions could raise fatal PHP errors if the setting is not' .
-                    ' raised further. A value of ' . $recommendedMaxNestingLevel . ' is recommended.' . LF .
-                    'xdebug.max_nesting_level=' . $recommendedMaxNestingLevel
-                );
+                $this->messageQueue->enqueue(new FlashMessage(
+                    'xdebug.max_nesting_level=' . $currentMaxNestingLevel . LF
+                        . 'This setting controls the maximum number of nested function calls to protect against'
+                        . ' infinite recursion. The current value is high enough for the TYPO3 CMS core to work'
+                        . ' fine, but still some extensions could raise fatal PHP errors if the setting is not'
+                        . ' raised further. A value of ' . $recommendedMaxNestingLevel . ' is recommended.' . LF
+                        . 'xdebug.max_nesting_level=' . $recommendedMaxNestingLevel,
+                    'PHP xdebug.max_nesting_level is low',
+                    FlashMessage::WARNING
+                ));
             } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP xdebug.max_nesting_level ok');
+                $this->messageQueue->enqueue(new FlashMessage(
+                    '',
+                    'PHP xdebug.max_nesting_level ok'
+                ));
             }
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP xdebug extension not loaded');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'PHP xdebug extension not loaded'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check accessibility and functionality of OpenSSL
-     *
-     * @return Status\StatusInterface
      */
     protected function checkOpenSslInstalled()
     {
@@ -535,33 +514,31 @@ class Check implements CheckInterface
             $testKey = @openssl_pkey_new();
             if (is_resource($testKey)) {
                 openssl_free_key($testKey);
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP OpenSSL extension installed properly');
+                $this->messageQueue->enqueue(new FlashMessage(
+                    '',
+                    'PHP OpenSSL extension installed properly'
+                ));
             } else {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP OpenSSL extension not working');
-                $status->setMessage(
-                    'Something went wrong while trying to create a new private key for testing.' .
-                    ' Please check the integration of the PHP OpenSSL extension and if it is installed correctly.'
-                );
+                $this->messageQueue->enqueue(new FlashMessage(
+                    'Something went wrong while trying to create a new private key for testing.'
+                        . ' Please check the integration of the PHP OpenSSL extension and if it is installed correctly.',
+                    'PHP OpenSSL extension not working',
+                    FlashMessage::ERROR
+                ));
             }
         } else {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('PHP OpenSSL extension not loaded');
-            $status->setMessage(
-                'OpenSSL is a PHP extension to encrypt/decrypt data between requests.' .
-                ' TYPO3 CMS requires it to be able to encrypt stored passwords to improve the security in the' .
-                ' database layer.'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'OpenSSL is a PHP extension to encrypt/decrypt data between requests.'
+                    . ' TYPO3 CMS requires it to be able to encrypt stored passwords to improve the security in the'
+                    . ' database layer.',
+                'PHP OpenSSL extension not loaded',
+                FlashMessage::ERROR
+            ));
         }
-
-        return $status;
     }
 
     /**
      * Get max_input_vars status
-     *
-     * @return Status\StatusInterface
      */
     protected function checkMaxInputVars()
     {
@@ -570,423 +547,120 @@ class Check implements CheckInterface
         $currentMaxInputVars = ini_get('max_input_vars');
 
         if ($currentMaxInputVars < $minimumMaxInputVars) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('PHP max_input_vars too low');
-            $status->setMessage(
-                'max_input_vars=' . $currentMaxInputVars . LF .
-                'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS' .
-                ' (as the install tool does). It is highly recommended to raise this' .
-                ' to at least ' . $recommendedMaxInputVars . ':' . LF .
-                'max_input_vars=' . $recommendedMaxInputVars
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'max_input_vars=' . $currentMaxInputVars . LF
+                    . 'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS'
+                    . ' (as the install tool does). It is highly recommended to raise this'
+                    . ' to at least ' . $recommendedMaxInputVars . ':' . LF
+                    . 'max_input_vars=' . $recommendedMaxInputVars,
+                'PHP max_input_vars too low',
+                FlashMessage::ERROR
+            ));
         } elseif ($currentMaxInputVars < $recommendedMaxInputVars) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('PHP max_input_vars very low');
-            $status->setMessage(
-                'max_input_vars=' . $currentMaxInputVars . LF .
-                'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS' .
-                ' (as the install tool does). It is highly recommended to raise this' .
-                ' to at least ' . $recommendedMaxInputVars . ':' . LF .
-                'max_input_vars=' . $recommendedMaxInputVars
-            );
-        } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP max_input_vars ok');
-        }
-        return $status;
-    }
-
-    /**
-     * Get suhosin loaded status
-     * Should be called only if suhosin extension is loaded
-     *
-     * @return Status\StatusInterface
-     * @throws \BadMethodCallException
-     */
-    protected function getSuhosinLoadedStatus()
-    {
-        if ($this->isSuhosinLoadedAndActive()) {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP suhosin extension loaded and active');
-            return $status;
-        }
-        throw new \BadMethodCallException('Should be called only if suhosin extension is loaded', 1422634778);
-    }
-
-    /**
-     * Check suhosin.request.max_vars
-     *
-     * @return Status\StatusInterface
-     */
-    protected function checkSuhosinRequestMaxVars()
-    {
-        $recommendedRequestMaxVars = 400;
-        if ($this->isSuhosinLoadedAndActive()) {
-            $currentRequestMaxVars = ini_get('suhosin.request.max_vars');
-            if ($currentRequestMaxVars < $recommendedRequestMaxVars) {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP suhosin.request.max_vars too low');
-                $status->setMessage(
-                    'suhosin.request.max_vars=' . $currentRequestMaxVars . LF .
-                    'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS' .
-                    ' (as the install tool does). It is highly recommended to raise this' .
-                    ' to at least ' . $recommendedRequestMaxVars . ':' . LF .
-                    'suhosin.request.max_vars=' . $recommendedRequestMaxVars
-                );
-            } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP suhosin.request.max_vars ok');
-            }
-        } else {
-            $status = new Status\InfoStatus();
-            $status->setTitle('Suhosin not loaded');
-            $status->setMessage(
-                'If enabling suhosin, suhosin.request.max_vars' .
-                ' should be set to at least ' . $recommendedRequestMaxVars . ':' . LF .
-                'suhosin.request.max_vars=' . $recommendedRequestMaxVars
-            );
-        }
-        return $status;
-    }
-
-    /**
-     * Check suhosin.request.max_varname_length
-     *
-     * @return Status\StatusInterface
-     */
-    protected function checkSuhosinRequestMaxVarnameLength()
-    {
-        $recommendedRequestMaxVarnameLength = 200;
-        if ($this->isSuhosinLoadedAndActive()) {
-            $currentRequestMaxVarnameLength = ini_get('suhosin.request.max_varname_length');
-            if ($currentRequestMaxVarnameLength < $recommendedRequestMaxVarnameLength) {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP suhosin.request.max_varname_length too low');
-                $status->setMessage(
-                    'suhosin.request.max_varname_length=' . $currentRequestMaxVarnameLength . LF .
-                    'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS' .
-                    ' (as the install tool does). It is highly recommended to raise this' .
-                    ' to at least ' . $recommendedRequestMaxVarnameLength . ':' . LF .
-                    'suhosin.request.max_varname_length=' . $recommendedRequestMaxVarnameLength
-                );
-            } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP suhosin.request.max_varname_length ok');
-            }
-        } else {
-            $status = new Status\InfoStatus();
-            $status->setTitle('Suhosin not loaded');
-            $status->setMessage(
-                'If enabling suhosin, suhosin.request.max_varname_length' .
-                ' should be set to at least ' . $recommendedRequestMaxVarnameLength . ':' . LF .
-                'suhosin.request.max_varname_length=' . $recommendedRequestMaxVarnameLength
-            );
-        }
-        return $status;
-    }
-
-    /**
-     * Check suhosin.post.max_name_length
-     *
-     * @return Status\StatusInterface
-     */
-    protected function checkSuhosinPostMaxNameLength()
-    {
-        $recommendedPostMaxNameLength = 200;
-        if ($this->isSuhosinLoadedAndActive()) {
-            $currentPostMaxNameLength = ini_get('suhosin.post.max_name_length');
-            if ($currentPostMaxNameLength < $recommendedPostMaxNameLength) {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP suhosin.post.max_name_length too low');
-                $status->setMessage(
-                    'suhosin.post.max_name_length=' . $currentPostMaxNameLength . LF .
-                    'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS' .
-                    ' (as the install tool does). It is highly recommended to raise this' .
-                    ' to at least ' . $recommendedPostMaxNameLength . ':' . LF .
-                    'suhosin.post.max_name_length=' . $recommendedPostMaxNameLength
-                );
-            } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP suhosin.post.max_name_length ok');
-            }
-        } else {
-            $status = new Status\InfoStatus();
-            $status->setTitle('Suhosin not loaded');
-            $status->setMessage(
-                'If enabling suhosin, suhosin.post.max_name_length' .
-                ' should be set to at least ' . $recommendedPostMaxNameLength . ':' . LF .
-                'suhosin.post.max_name_length=' . $recommendedPostMaxNameLength
-            );
-        }
-        return $status;
-    }
-
-    /**
-     * Check suhosin.post.max_vars
-     *
-     * @return Status\StatusInterface
-     */
-    protected function checkSuhosinPostMaxVars()
-    {
-        $recommendedPostMaxVars = 400;
-        if ($this->isSuhosinLoadedAndActive()) {
-            $currentPostMaxVars = ini_get('suhosin.post.max_vars');
-            if ($currentPostMaxVars < $recommendedPostMaxVars) {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP suhosin.post.max_vars too low');
-                $status->setMessage(
-                    'suhosin.post.max_vars=' . $currentPostMaxVars . LF .
-                    'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS' .
-                    ' (as the install tool does). It is highly recommended to raise this' .
-                    ' to at least ' . $recommendedPostMaxVars . ':' . LF .
-                    'suhosin.post.max_vars=' . $recommendedPostMaxVars
-                );
-            } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP suhosin.post.max_vars ok');
-            }
-        } else {
-            $status = new Status\InfoStatus();
-            $status->setTitle('Suhosin not loaded');
-            $status->setMessage(
-                'If enabling suhosin, suhosin.post.max_vars' .
-                ' should be set to at least ' . $recommendedPostMaxVars . ':' . LF .
-                'suhosin.post.max_vars=' . $recommendedPostMaxVars
-            );
-        }
-        return $status;
-    }
-
-    /**
-     * Check suhosin.get.max_value_length
-     *
-     * @return Status\StatusInterface
-     */
-    protected function checkSuhosinGetMaxValueLength()
-    {
-        $recommendedGetMaxValueLength = 2000;
-        if ($this->isSuhosinLoadedAndActive()) {
-            $currentGetMaxValueLength = ini_get('suhosin.get.max_value_length');
-            if ($currentGetMaxValueLength < $recommendedGetMaxValueLength) {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP suhosin.get.max_value_length too low');
-                $status->setMessage(
-                    'suhosin.get.max_value_length=' . $currentGetMaxValueLength . LF .
-                    'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS' .
-                    ' (as the install tool does). It is highly recommended to raise this' .
-                    ' to at least ' . $recommendedGetMaxValueLength . ':' . LF .
-                    'suhosin.get.max_value_length=' . $recommendedGetMaxValueLength
-                );
-            } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP suhosin.get.max_value_length ok');
-            }
+            $this->messageQueue->enqueue(new FlashMessage(
+                'max_input_vars=' . $currentMaxInputVars . LF
+                    . 'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS'
+                    . ' (as the install tool does). It is highly recommended to raise this'
+                    . ' to at least ' . $recommendedMaxInputVars . ':' . LF
+                    . 'max_input_vars=' . $recommendedMaxInputVars,
+                'PHP max_input_vars very low',
+                FlashMessage::WARNING
+            ));
         } else {
-            $status = new Status\InfoStatus();
-            $status->setTitle('Suhosin not loaded');
-            $status->setMessage(
-                'If enabling suhosin, suhosin.get.max_value_length' .
-                ' should be set to at least ' . $recommendedGetMaxValueLength . ':' . LF .
-                'suhosin.get.max_value_length=' . $recommendedGetMaxValueLength
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'PHP max_input_vars ok'
+            ));
         }
-        return $status;
-    }
-
-    /**
-     * Check suhosin.get.max_name_length
-     *
-     * @return Status\StatusInterface
-     */
-    protected function checkSuhosinGetMaxNameLength()
-    {
-        $recommendedGetMaxNameLength = 200;
-        if ($this->isSuhosinLoadedAndActive()) {
-            $currentGetMaxNameLength = ini_get('suhosin.get.max_name_length');
-            if ($currentGetMaxNameLength < $recommendedGetMaxNameLength) {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP suhosin.get.max_name_length too low');
-                $status->setMessage(
-                    'suhosin.get.max_name_length=' . $currentGetMaxNameLength . LF .
-                    'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS' .
-                    ' (as the install tool does). It is highly recommended to raise this' .
-                    ' to at least ' . $recommendedGetMaxNameLength . ':' . LF .
-                    'suhosin.get.max_name_length=' . $recommendedGetMaxNameLength
-                );
-            } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP suhosin.get.max_name_length ok');
-            }
-        } else {
-            $status = new Status\InfoStatus();
-            $status->setTitle('Suhosin not loaded');
-            $status->setMessage(
-                'If enabling suhosin, suhosin.get.max_name_length' .
-                ' should be set to at least ' . $recommendedGetMaxNameLength . ':' . LF .
-                'suhosin.get.max_name_length=' . $recommendedGetMaxNameLength
-            );
-        }
-        return $status;
-    }
-
-    /**
-     * Check suhosin.executor.include.whitelist contains phar
-     *
-     * @return Status\StatusInterface
-     */
-    protected function checkSuhosinExecutorIncludeWhiteListContainsPhar()
-    {
-        if ($this->isSuhosinLoadedAndActive()) {
-            $whitelist = (string)ini_get('suhosin.executor.include.whitelist');
-            if (strpos($whitelist, 'phar') === false) {
-                $status = new Status\NoticeStatus();
-                $status->setTitle('PHP suhosin.executor.include.whitelist does not contain phar');
-                $status->setMessage(
-                    'suhosin.executor.include.whitelist= ' . $whitelist . LF .
-                    '"phar" is currently not a hard requirement of TYPO3 CMS but is nice to have and a possible' .
-                    ' requirement in future versions. A useful setting is:' . LF .
-                    'suhosin.executor.include.whitelist=phar,vfs'
-                );
-            } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP suhosin.executor.include.whitelist contains phar');
-            }
-        } else {
-            $status = new Status\InfoStatus();
-            $status->setTitle('Suhosin not loaded');
-            $status->setMessage(
-                'If enabling suhosin, a useful setting is:' . LF .
-                'suhosin.executor.include.whitelist=phar,vfs'
-            );
-        }
-        return $status;
-    }
-
-    /**
-     * Check suhosin.executor.include.whitelist contains vfs
-     *
-     * @return Status\StatusInterface
-     */
-    protected function checkSuhosinExecutorIncludeWhiteListContainsVfs()
-    {
-        if ($this->isSuhosinLoadedAndActive()) {
-            $whitelist = (string)ini_get('suhosin.executor.include.whitelist');
-            if (strpos($whitelist, 'vfs') === false) {
-                $status = new Status\WarningStatus();
-                $status->setTitle('PHP suhosin.executor.include.whitelist does not contain vfs');
-                $status->setMessage(
-                    'suhosin.executor.include.whitelist= ' . $whitelist . LF .
-                    '"vfs" is currently not a hard requirement of TYPO3 CMS but tons of unit tests rely on it.' .
-                    ' Furthermore, vfs will likely be a base for an additional compatibility layer in the future.' .
-                    ' A useful setting is:' . LF .
-                    'suhosin.executor.include.whitelist=phar,vfs'
-                );
-            } else {
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP suhosin.executor.include.whitelist contains vfs');
-            }
-        } else {
-            $status = new Status\InfoStatus();
-            $status->setTitle('Suhosin not loaded');
-            $status->setMessage(
-                'If enabling suhosin, a useful setting is:' . LF .
-                'suhosin.executor.include.whitelist=phar,vfs'
-            );
-        }
-        return $status;
     }
 
     /**
      * Check doc comments can be fetched by reflection
-     *
-     * @return Status\StatusInterface
      */
     protected function checkReflectionDocComment()
     {
         $testReflection = new \ReflectionMethod(get_class($this), __FUNCTION__);
         if ($testReflection->getDocComment() === false) {
-            $status = new Status\AlertStatus();
-            $status->setTitle('PHP Doc comment reflection broken');
-            $status->setMessage(
+            $this->messageQueue->enqueue(new FlashMessage(
                 'TYPO3 CMS core extensions like extbase and fluid heavily rely on method'
-                . ' comment parsing to fetch annotations and add magic belonging to them.'
-                . ' This does not work in the current environment and so we cannot install'
-                . ' TYPO3 CMS.' . LF
-                . ' Here are some possibilities: ' . LF
-                . '* In Zend OPcache you can disable saving/loading comments. If you are using'
-                . ' Zend OPcache (included since PHP 5.5) then check your php.ini settings for'
-                . ' opcache.save_comments and opcache.load_comments and enable them.' . LF
-                . '* In Zend Optimizer+ you can disable saving comments. If you are using'
-                . ' Zend Optimizer+ then check your php.ini settings for'
-                . ' zend_optimizerplus.save_comments and enable it.' . LF
-                . '* The PHP extension eaccelerator is known to break this if'
-                . ' it is compiled without --with-eaccelerator-doc-comment-inclusion flag.'
-                . ' This compile flag must be specified, otherwise TYPO3 CMS will not work.' . LF
-                . 'For more information take a look in our wiki ' . TYPO3_URL_WIKI_OPCODECACHE . '.'
-            );
+                    . ' comment parsing to fetch annotations and add magic belonging to them.'
+                    . ' This does not work in the current environment and so we cannot install'
+                    . ' TYPO3 CMS.' . LF
+                    . ' Here are some possibilities: ' . LF
+                    . '* In Zend OPcache you can disable saving/loading comments. If you are using'
+                    . ' Zend OPcache (included since PHP 5.5) then check your php.ini settings for'
+                    . ' opcache.save_comments and opcache.load_comments and enable them.' . LF
+                    . '* In Zend Optimizer+ you can disable saving comments. If you are using'
+                    . ' Zend Optimizer+ then check your php.ini settings for'
+                    . ' zend_optimizerplus.save_comments and enable it.' . LF
+                    . '* The PHP extension eaccelerator is known to break this if'
+                    . ' it is compiled without --with-eaccelerator-doc-comment-inclusion flag.'
+                    . ' This compile flag must be specified, otherwise TYPO3 CMS will not work.' . LF
+                    . 'For more information take a look in our wiki ' . TYPO3_URL_WIKI_OPCODECACHE . '.',
+                'PHP Doc comment reflection broken',
+                FlashMessage::ERROR
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP Doc comment reflection works');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'PHP Doc comment reflection works'
+            ));
         }
-        return $status;
     }
 
     /**
      * Checks thread stack size if on windows with apache
-     *
-     * @return Status\StatusInterface
      */
     protected function checkWindowsApacheThreadStackSize()
     {
         if ($this->isWindowsOs()
             && substr($_SERVER['SERVER_SOFTWARE'], 0, 6) === 'Apache'
         ) {
-            $status = new Status\WarningStatus();
-            $status->setTitle('Windows apache thread stack size');
-            $status->setMessage(
-                'This current value cannot be checked by the system, so please ignore this warning if it' .
-                ' is already taken care of: Fluid uses complex regular expressions which require a lot' .
-                ' of stack space during the first processing.' .
-                ' On Windows the default stack size for Apache is a lot smaller than on UNIX.' .
-                ' You can increase the size to 8MB (default on UNIX) by adding the following configuration' .
-                ' to httpd.conf and restarting Apache afterwards:' . LF .
-                '&lt;IfModule mpm_winnt_module&gt;' . LF .
-                'ThreadStackSize 8388608' . LF .
-                '&lt;/IfModule&gt;'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'This current value cannot be checked by the system, so please ignore this warning if it'
+                    . ' is already taken care of: Fluid uses complex regular expressions which require a lot'
+                    . ' of stack space during the first processing.'
+                    . ' On Windows the default stack size for Apache is a lot smaller than on UNIX.'
+                    . ' You can increase the size to 8MB (default on UNIX) by adding the following configuration'
+                    . ' to httpd.conf and restarting Apache afterwards:' . LF
+                    . '&lt;IfModule mpm_winnt_module&gt;' . LF
+                    . 'ThreadStackSize 8388608' . LF
+                    . '&lt;/IfModule&gt;',
+                'Windows apache thread stack size',
+                FlashMessage::WARNING
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('Apache ThreadStackSize is not an issue on UNIX systems');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'Apache ThreadStackSize is not an issue on UNIX systems'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check if a specific required PHP extension is loaded
      *
      * @param string $extension
-     * @return Status\StatusInterface
      */
     protected function checkRequiredPhpExtension($extension)
     {
         if (!extension_loaded($extension)) {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('PHP extension ' . $extension . ' not loaded');
-            $status->setMessage(
-                'TYPO3 CMS uses PHP extension ' . $extension . ' but it is not loaded' .
-                ' in your environment. Change your environment to provide this extension.'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'TYPO3 CMS uses PHP extension ' . $extension . ' but it is not loaded'
+                    . ' in your environment. Change your environment to provide this extension.',
+                'PHP extension ' . $extension . ' not loaded',
+                FlashMessage::ERROR
+            ));
         } else {
-            $status = new Status\OkStatus();
-            $status->setTitle('PHP extension ' . $extension . ' loaded');
+            $this->messageQueue->enqueue(new FlashMessage(
+                '',
+                'PHP extension ' . $extension . ' loaded'
+            ));
         }
-        return $status;
     }
 
     /**
      * Check imagecreatetruecolor to verify gdlib works as expected
-     *
-     * @return Status\StatusInterface
      */
     protected function checkGdLibTrueColorSupport()
     {
@@ -994,30 +668,29 @@ class Check implements CheckInterface
             $imageResource = @imagecreatetruecolor(50, 100);
             if (is_resource($imageResource)) {
                 imagedestroy($imageResource);
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP GD library true color works');
+                $this->messageQueue->enqueue(new FlashMessage(
+                    '',
+                    'PHP GD library true color works'
+                ));
             } else {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP GD library true color support broken');
-                $status->setMessage(
-                    'GD is loaded, but calling imagecreatetruecolor() fails.' .
-                    ' This must be fixed, TYPO3 CMS won\'t work well otherwise.'
-                );
+                $this->messageQueue->enqueue(new FlashMessage(
+                    'GD is loaded, but calling imagecreatetruecolor() fails.'
+                        . ' This must be fixed, TYPO3 CMS won\'t work well otherwise.',
+                    'PHP GD library true color support broken',
+                    FlashMessage::ERROR
+                ));
             }
         } else {
-            $status = new Status\ErrorStatus();
-            $status->setTitle('PHP GD library true color support missing');
-            $status->setMessage(
-                'Gdlib is essential for TYPO3 CMS to work properly.'
-            );
+            $this->messageQueue->enqueue(new FlashMessage(
+                'Gdlib is essential for TYPO3 CMS to work properly.',
+                'PHP GD library true color support missing',
+                FlashMessage::ERROR
+            ));
         }
-        return $status;
     }
 
     /**
      * Check gif support of GD library
-     *
-     * @return Status\StatusInterface
      */
     protected function checkGdLibGifSupport()
     {
@@ -1029,31 +702,28 @@ class Check implements CheckInterface
             $imageResource = @imagecreatefromgif('data://image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
             if (is_resource($imageResource)) {
                 imagedestroy($imageResource);
-                $status = new Status\OkStatus();
-                $status->setTitle('PHP GD library has gif support');
+                $this->messageQueue->enqueue(new FlashMessage(
+                    '',
+                    'PHP GD library has gif support'
+                ));
             } else {
-                $status = new Status\ErrorStatus();
-                $status->setTitle('PHP GD library gif support broken');
-                $status->setMessage(
-                    'GD is loaded, but calling imagecreatefromgif() fails.' .
-                    ' This must be fixed, TYPO3 CMS won\'t work well otherwise.'
-                );
+                $this->messageQueue->enqueue(new FlashMessage(
+                    'GD is loaded, but calling imagecreatefromgif() fails. This must be fixed, TYPO3 CMS won\'t work well otherwise.',
+                    'PHP GD library gif support broken',
+                    FlashMessage::ERROR
+                )