[BUGFIX] Reload classAliasMap after extension installation 12/39112/3
authorNicole Cordes <typo3@cordes.co>
Thu, 30 Apr 2015 19:48:04 +0000 (21:48 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sat, 2 May 2015 21:05:39 +0000 (23:05 +0200)
If an extension is installed at least the system cache is cleared
which throws away all defined class aliases as well. Those are only
loaded by bootstrap at the very beginning of an request and need to
be reloaded by the install process manually. This patch adds the
necessary call to ClassLoader.

Releases: master, 6.2
Resolves: #66696
Related: #65141
Change-Id: I4ace91789c43855acba91ac356b2263171cc921a
Reviewed-on: http://review.typo3.org/39112
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php

index 156bf10..7142f3b 100644 (file)
@@ -108,6 +108,9 @@ class InstallUtility implements \TYPO3\CMS\Core\SingletonInterface {
                } else {
                        $this->cacheManager->flushCachesInGroup('system');
                }
+               // Reload class aliases defined in Migrations/Code/ClassAliasMap.php
+               \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->getEarlyInstance(\TYPO3\CMS\Core\Core\ClassLoader::class)
+                       ->setPackages($this->packageManager->getActivePackages());
                $this->reloadCaches();
 
                $this->importInitialFiles($extension['siteRelPath'], $extensionKey);