[BUGFIX] Fix declaration of injectView in install tool 17/54417/5
authorSusanne Moog <susanne.moog@typo3.com>
Tue, 17 Oct 2017 16:22:08 +0000 (18:22 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 17 Oct 2017 23:37:18 +0000 (01:37 +0200)
When using PHP7 declarations of sub classes have to
be compatible to their parent declarations.

As the install tool has been completely refactored in
newer TYPO3 version this patch implements only a
workaround to prevent the PHP warning.

Change-Id: I4128b3aef30a3a1bb9de6188509db1cdf4314b02
Resolves: #77203
Releases: 7.6
Reviewed-on: https://review.typo3.org/54417
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/install/Classes/Controller/Action/Ajax/AbstractCoreUpdate.php

index d8cc34c..bcedfcc 100644 (file)
@@ -41,9 +41,20 @@ abstract class AbstractCoreUpdate extends AbstractAjaxAction
     protected $coreVersionService;
 
     /**
+     * @param \TYPO3\CMS\Install\View\FailsafeView $view
+     */
+    public function injectView(\TYPO3\CMS\Install\View\FailsafeView $view)
+    {
+        // dummy method to stop setting view to failsafeView while keeping
+        // compatibility with parent declaration (and thus errors on PHP7)
+        // while allowing dependency injection to inject correct view by
+        // using method below.
+    }
+
+    /**
      * @param \TYPO3\CMS\Install\View\JsonView $view
      */
-    public function injectView(\TYPO3\CMS\Install\View\JsonView $view)
+    public function injectJsonView(\TYPO3\CMS\Install\View\JsonView $view)
     {
         $this->view = $view;
     }