Revert "[TASK] Show case sensitive command identifier" 87/49387/2
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 5 Aug 2016 10:11:13 +0000 (12:11 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 6 Aug 2016 17:45:40 +0000 (19:45 +0200)
This reverts commit 5a57011202e7848fae14b4b313bb09e5e69bdcb1.

Change-Id: Ie1762c3192ab10682f0c2ad303e6577ee3780798
Resolves: #77415
Reverts: #76712
Reviewed-on: https://review.typo3.org/49387
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/extbase/Classes/Mvc/Cli/Command.php
typo3/sysext/extbase/Classes/Mvc/Cli/CommandManager.php
typo3/sysext/extbase/Tests/Unit/Mvc/Cli/CommandTest.php

index 7e8fc02..57eadba 100644 (file)
@@ -108,7 +108,7 @@ class Command
 
         $this->extensionName = $classNameParts[1];
         $extensionKey = \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($this->extensionName);
-        $this->commandIdentifier = ($extensionKey . ':' . substr($classNameParts[$numberOfClassNameParts - 1], 0, -17) . ':' . $controllerCommandName);
+        $this->commandIdentifier = strtolower($extensionKey . ':' . substr($classNameParts[$numberOfClassNameParts - 1], 0, -17) . ':' . $controllerCommandName);
     }
 
     /**
index 3c99f73..92b3f6b 100644 (file)
@@ -162,8 +162,8 @@ class CommandManager implements \TYPO3\CMS\Core\SingletonInterface
      */
     protected function commandMatchesIdentifier(Command $command, $commandIdentifier)
     {
-        $commandIdentifierParts = explode(':', strtolower($command->getCommandIdentifier()));
-        $searchedCommandIdentifierParts = explode(':', strtolower($commandIdentifier));
+        $commandIdentifierParts = explode(':', $command->getCommandIdentifier());
+        $searchedCommandIdentifierParts = explode(':', $commandIdentifier);
         $extensionKey = array_shift($commandIdentifierParts);
         if (count($searchedCommandIdentifierParts) === 3) {
             $searchedExtensionKey = array_shift($searchedCommandIdentifierParts);
index 9c09037..436ae09 100644 (file)
@@ -59,9 +59,9 @@ class CommandTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function commandIdentifiers()
     {
         return array(
-            array('Tx_ExtensionKey_Command_CacheCommandController', 'flush', 'extension_key:Cache:flush'),
-            array('Tx_Ext_Command_CookieCommandController', 'bake', 'ext:Cookie:bake'),
-            array('Tx_OtherExtensionKey_Foo_Faa_Fuuum_Command_CoffeeCommandController', 'brew', 'other_extension_key:Coffee:brew'),
+            array('Tx_ExtensionKey_Command_CacheCommandController', 'flush', 'extension_key:cache:flush'),
+            array('Tx_Ext_Command_CookieCommandController', 'bake', 'ext:cookie:bake'),
+            array('Tx_OtherExtensionKey_Foo_Faa_Fuuum_Command_CoffeeCommandController', 'brew', 'other_extension_key:coffee:brew'),
         );
     }