[BUGFIX] Fix the extbase CoreCommand with lowest requirements 11/58711/3
authorOliver Klee <typo3-coding@oliverklee.de>
Fri, 26 Oct 2018 13:00:30 +0000 (15:00 +0200)
committerBenni Mack <benni@typo3.org>
Sun, 28 Oct 2018 13:07:55 +0000 (14:07 +0100)
The extbase CoreCommand class calls a method that was introduced in
symfony/console 3.2. So the CoreCommand class needs to check whether
the method-to-call actually exists before calling it.

This only affects the 8.7 branch as the master/9LTS branch already
requires a higher version of symfony/console, and 7.6 does not have
the class with the corresponding call yet.

Resolves: #86753
Releases: 8.7
Change-Id: I8dad6abd4b07c23b7520726f120a6116227c33a7
Reviewed-on: https://review.typo3.org/58711
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/extbase/Classes/Command/CoreCommand.php

index 15f1bff..0d4387d 100644 (file)
@@ -38,7 +38,9 @@ class CoreCommand extends Command
      */
     protected function configure()
     {
-        $this->setHidden(true);
+        if (method_exists($this, 'setHidden')) {
+            $this->setHidden(true);
+        }
     }
 
     /**