Task #84117

Epic #83968: PSR-11 Initiative

Do not reinitialize CacheManager and PackageManager in clearAllCache

Added by Benjamin Franzke over 1 year ago. Updated 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
Start date:
2018-03-02
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

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.

Associated revisions

Revision f3eca095 (diff)
Added by Benjamin Franzke over 1 year ago

[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 <>
Reviewed-by: Tobi Kretschmann <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55988

#2 Updated by Benjamin Franzke over 1 year ago

  • Priority changed from Should have to Won't have this time

This is wrong. Bootstrap::loadTypo3LoadedExtAndExtLocalconf requires $GLOBALS['TYPO3_LOADED_EXT'] and therefore initializePackageManagement is required.

Can be closed.

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55988

#4 Updated by Benjamin Franzke over 1 year ago

  • Priority changed from Won't have this time to Should have

This is wrong. Bootstrap::loadTypo3LoadedExtAndExtLocalconf requires $GLOBALS['TYPO3_LOADED_EXT'] and therefore initializePackageManagement is required.

Need to revert myself here. There is NO new PackageManager required as the FailsafePackageManager loads all active extensions defined in PackagesStates.php.
Therefore my proposed solution is still valid.

#5 Updated by Benjamin Franzke over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

#7 Updated by Benjamin Franzke 2 months ago

  • Parent task set to #83968

Also available in: Atom PDF