[BUGFIX] Allow multiple aliases for a class 58/27558/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Tue, 11 Feb 2014 20:27:06 +0000 (21:27 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 11 Feb 2014 21:01:42 +0000 (22:01 +0100)
When working on #55559 (refactoring class alias handling)
accidentally code was introduced to avoid more than
one alias for a class name.
Remove this code to make multiple aliases work again.

Fixes: #55897
Releases: 6.2
Change-Id: I8b4b721c57c52d117130947fe92c564d6ddcdd9b
Reviewed-on: https://review.typo3.org/27558
Reviewed-by: Claus Due
Tested-by: Claus Due
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/core/Classes/Core/ClassAliasMap.php

index a7ef225..4b6026e 100644 (file)
@@ -103,8 +103,6 @@ class ClassAliasMap implements \TYPO3\CMS\Core\SingletonInterface {
         * @return array
         */
        public function buildMappingAndInitializeEarlyInstanceMapping() {
-               // Simple registry to filter class names with different cases
-               $classNameRegistry = array();
                // Needed for early instance alias mapping
                $aliasToClassNameMapping = array();
                // Final mapping array
@@ -113,14 +111,7 @@ class ClassAliasMap implements \TYPO3\CMS\Core\SingletonInterface {
                        if (!$package instanceof \TYPO3\CMS\Core\Package\Package) {
                                continue;
                        }
-
                        foreach ($package->getClassAliases() as $aliasClassName => $className) {
-                               $lookUpClassName = strtolower($className);
-                               if (isset($classNameRegistry[$lookUpClassName])) {
-                                       continue;
-                               }
-
-                               $classNameRegistry[$lookUpClassName] = TRUE;
                                $lowercasedAliasClassName = strtolower($aliasClassName);
                                $aliasToClassNameMapping[$lowercasedAliasClassName] = $className;
                                $classNameToAliasMapping[$className][$lowercasedAliasClassName] = $lowercasedAliasClassName;