[TASK] Remove package class source from package manager cache 93/42693/3
authorHelmut Hummel <helmut.hummel@typo3.org>
Mon, 17 Aug 2015 22:18:57 +0000 (00:18 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 18 Aug 2015 08:58:02 +0000 (10:58 +0200)
Writing the package class source to the package manager cache
has become pointless after package management cleanup.
It is only the source of one class and this source stays always
the same. We do not win anything from writing it to the cache.

Resolves: #69142
Releases: master
Change-Id: I8b910c3e133b1ffd9f0efbdbceb6dd067d9d6f78
Reviewed-on: http://review.typo3.org/42693
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Package/PackageManager.php

index 9d0efce..829d86a 100644 (file)
@@ -200,17 +200,10 @@ class PackageManager implements \TYPO3\CMS\Core\SingletonInterface {
                                'loadedExtArray' => $GLOBALS['TYPO3_LOADED_EXT'],
                                'packageObjectsCacheEntryIdentifier' => $packageObjectsCacheEntryIdentifier
                        );
-                       // Add the reflection of the package class
-                       $packageClassName = strtolower(Package::class);
-                       $reflectionPackageClass = new \ReflectionClass($packageClassName);
-                       $packageClassSource = file_get_contents($reflectionPackageClass->getFileName());
-                       $packageClassSource = preg_replace('/<\?php|\?>/i', '', $packageClassSource);
-
                        $this->coreCache->set($packageObjectsCacheEntryIdentifier, serialize($this->packages));
                        $this->coreCache->set(
                                $cacheEntryIdentifier,
-                               $packageClassSource . PHP_EOL .
-                                       'return ' . PHP_EOL . var_export($packageCache, TRUE) . ';'
+                               'return ' . PHP_EOL . var_export($packageCache, TRUE) . ';'
                        );
                }
        }