[BUGFIX] Register runtime class loading info on ext update 60/40160/3
authorHelmut Hummel <helmut.hummel@typo3.org>
Wed, 10 Jun 2015 21:56:13 +0000 (23:56 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Thu, 11 Jun 2015 10:08:03 +0000 (12:08 +0200)
Since the runtime class loading information is
set during activation of the package, we need to ensure
that this code is called.

Releases: master
Resolves: #67410
Change-Id: I635e858b58c15d8563b4da54c009004e0a7416f9
Reviewed-on: http://review.typo3.org/40160
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/core/Classes/Package/PackageManager.php
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php

index c69924a..f597320 100644 (file)
@@ -635,18 +635,19 @@ class PackageManager implements \TYPO3\CMS\Core\SingletonInterface {
         * @param string $packageKey
         */
        public function activatePackage($packageKey) {
+               $package = $this->getPackage($packageKey);
+               $this->registerTransientClassLoadingInformationForPackage($package);
+
                if ($this->isPackageActive($packageKey)) {
                        return;
                }
 
-               $package = $this->getPackage($packageKey);
                $this->activePackages[$packageKey] = $package;
                $this->packageStatesConfiguration['packages'][$packageKey]['state'] = 'active';
                if (!isset($this->packageStatesConfiguration['packages'][$packageKey]['packagePath'])) {
                        $this->packageStatesConfiguration['packages'][$packageKey]['packagePath'] = str_replace($this->packagesBasePath, '', $package->getPackagePath());
                }
                $this->sortAndSavePackageStates();
-               $this->registerTransientClassLoadingInformationForPackage($package);
        }
 
        /**
index 156bf10..433d26d 100644 (file)
@@ -100,9 +100,7 @@ class InstallUtility implements \TYPO3\CMS\Core\SingletonInterface {
        public function install($extensionKey) {
                $extension = $this->enrichExtensionWithDetails($extensionKey);
                $this->ensureConfiguredDirectoriesExist($extension);
-               if (!$this->isLoaded($extensionKey)) {
-                       $this->loadExtension($extensionKey);
-               }
+               $this->loadExtension($extensionKey);
                if (!empty($extension['clearcacheonload']) || !empty($extension['clearCacheOnLoad'])) {
                        $this->cacheManager->flushCaches();
                } else {