From f3eca0951b00d67db61309e6d102444921895727 Mon Sep 17 00:00:00 2001
From: Benjamin Franzke <bfr@qbus.de>
Date: Fri, 2 Mar 2018 14:01:11 +0100
Subject: [PATCH] [TASK] Do not reinitialize cache and package manager in
 clearAllCache

Those (re)initializations originate from https://review.typo3.org/19605
were reinitializeClassLoaderAndCachesAndPackageManagement()
was used to "Reinitialize the class loader during clear cache actions"
(according to phpdoc).

Then with the changes in https://review.typo3.org/29811
reinitializeClassLoaderAndCachesAndPackageManagement()
was dropped and splitted into unregisterClassLoader(),
flagCachingFrameworkForReinitialization().
initializeCachingFramework() and initializePackageManagement().
(just historical info, still all good)

Then http://review.typo3.org/39827 came and dropped unregisterClassLoader
but left the CacheManager and PackageManager reinitialization in place
superfluously. It's superfluous as the original usecase was to
reinitialize the class loader which is no longer required.

Note: InstallTool uses the FailsafePackageManager, although it's called
failsafe it still loads _all_ packages defined in PackageStates.php
into $GLOBALS['TYPO3_LOADED_EXT'] and therefore there is no requirement
for a new PackageManager instance to load ext_localconf.php from all
active extensions.

Change-Id: I844b0e3d8a63e64437ac57a716646e4902256e89
Releases: master
Resolves: #84117
Reviewed-on: https://review.typo3.org/55988
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 typo3/sysext/install/Classes/Service/ClearCacheService.php | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/typo3/sysext/install/Classes/Service/ClearCacheService.php b/typo3/sysext/install/Classes/Service/ClearCacheService.php
index 1235ea2f2aaf..52a5ee5f908d 100644
--- a/typo3/sysext/install/Classes/Service/ClearCacheService.php
+++ b/typo3/sysext/install/Classes/Service/ClearCacheService.php
@@ -42,11 +42,6 @@ class ClearCacheService
         // Delete typo3temp/Cache
         GeneralUtility::flushDirectory(PATH_site . 'typo3temp/var/Cache', true, true);
 
-        $bootstrap = Bootstrap::getInstance();
-        $bootstrap
-            ->initializeCachingFramework()
-            ->initializePackageManagement(\TYPO3\CMS\Core\Package\PackageManager::class);
-
         // Get all table names from Default connection starting with 'cf_' and truncate them
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
         $connection = $connectionPool->getConnectionByName('Default');
-- 
GitLab