[BUGFIX] Suffix all interfaces with Interface 43/58143/3
authorBenni Mack <benni@typo3.org>
Mon, 3 Sep 2018 15:54:38 +0000 (17:54 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 3 Sep 2018 16:47:12 +0000 (18:47 +0200)
The patch introducing interfaces for upgrade wizards had some mixed
namings, which are now corrected.

Resolves: #86112
Releases: master
Change-Id: I5ada026d00f9482b1c89fed63cb40a9ba6fb790e
Reviewed-on: https://review.typo3.org/58143
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/install/Classes/Updates/DatabaseUpdatedPrerequisite.php
typo3/sysext/install/Classes/Updates/Prerequisite.php [deleted file]
typo3/sysext/install/Classes/Updates/PrerequisiteCollection.php
typo3/sysext/install/Classes/Updates/PrerequisiteInterface.php [new file with mode: 0644]
typo3/sysext/install/Classes/Updates/ReferenceIndexUpdatedPrerequisite.php

index 6c4353f..9655b4f 100644 (file)
@@ -24,7 +24,7 @@ use TYPO3\CMS\Install\Service\UpgradeWizardsService;
  *
  * @internal
  */
-class DatabaseUpdatedPrerequisite implements Prerequisite, ChattyInterface
+class DatabaseUpdatedPrerequisite implements PrerequisiteInterface, ChattyInterface
 {
     /**
      * @var UpgradeWizardsService
diff --git a/typo3/sysext/install/Classes/Updates/Prerequisite.php b/typo3/sysext/install/Classes/Updates/Prerequisite.php
deleted file mode 100644 (file)
index f467708..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace TYPO3\CMS\Install\Updates;
-
-/*
- * 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!
- */
-
-/**
- * UpgradeWizard Prerequisites
- *
- * @internal
- */
-interface Prerequisite
-{
-    /**
-     * Get speaking name of this prerequisite
-     *
-     * @return string
-     */
-    public function getTitle(): string;
-
-    /**
-     * Ensure this prerequisite is fulfilled
-     *
-     * Gets called if "isFulfilled" returns false
-     * and should ensure the prerequisite
-     *
-     * Returns true on success, false on error
-     *
-     * @see isFulfilled
-     * @return bool
-     */
-    public function ensure(): bool;
-
-    /**
-     * Is this prerequisite met?
-     *
-     * Checks whether this prerequisite is fulfilled. If it is not,
-     * ensure should be called to fulfill it.
-     *
-     * @see ensure
-     * @return bool
-     */
-    public function isFulfilled(): bool;
-}
index 3dbbdf1..385ef3f 100644 (file)
@@ -36,7 +36,7 @@ class PrerequisiteCollection implements \IteratorAggregate
     {
         if (
             !($this->prerequisites[$prerequisiteClass] ?? false)
-            && is_a($prerequisiteClass, Prerequisite::class, true)
+            && is_a($prerequisiteClass, PrerequisiteInterface::class, true)
         ) {
             $this->prerequisites[$prerequisiteClass] = GeneralUtility::makeInstance(
                 $prerequisiteClass
@@ -45,7 +45,7 @@ class PrerequisiteCollection implements \IteratorAggregate
     }
 
     /**
-     * @return \ArrayObject|\Traversable|Prerequisite[]
+     * @return \ArrayObject|\Traversable|PrerequisiteInterface[]
      */
     public function getIterator()
     {
diff --git a/typo3/sysext/install/Classes/Updates/PrerequisiteInterface.php b/typo3/sysext/install/Classes/Updates/PrerequisiteInterface.php
new file mode 100644 (file)
index 0000000..47c7007
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+declare(strict_types = 1);
+
+namespace TYPO3\CMS\Install\Updates;
+
+/*
+ * 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!
+ */
+
+/**
+ * UpgradeWizard Prerequisites
+ *
+ * @internal
+ */
+interface PrerequisiteInterface
+{
+    /**
+     * Get speaking name of this prerequisite
+     *
+     * @return string
+     */
+    public function getTitle(): string;
+
+    /**
+     * Ensure this prerequisite is fulfilled
+     *
+     * Gets called if "isFulfilled" returns false
+     * and should ensure the prerequisite
+     *
+     * Returns true on success, false on error
+     *
+     * @see isFulfilled
+     * @return bool
+     */
+    public function ensure(): bool;
+
+    /**
+     * Is this prerequisite met?
+     *
+     * Checks whether this prerequisite is fulfilled. If it is not,
+     * ensure should be called to fulfill it.
+     *
+     * @see ensure
+     * @return bool
+     */
+    public function isFulfilled(): bool;
+}
index f360069..d7ebc5e 100644 (file)
@@ -27,7 +27,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * @internal
  */
-class ReferenceIndexUpdatedPrerequisite implements Prerequisite, ChattyInterface
+class ReferenceIndexUpdatedPrerequisite implements PrerequisiteInterface, ChattyInterface
 {
     /**
      * @var object|\TYPO3\CMS\Core\Database\ReferenceIndex