[FOLLOWUP][TASK] Improve TCA cache
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Utility / ExtensionManagementUtility.php
index 94f7deb..b00e327 100644 (file)
@@ -1690,7 +1690,13 @@ tt_content.' . $key . $suffix . ' {
             $cacheData = $codeCache->requireOnce($cacheIdentifier);
             if ($cacheData) {
                 $GLOBALS['TCA'] = $cacheData['tca'];
-                GeneralUtility::setSingletonInstance(CategoryRegistry::class, unserialize($cacheData['categoryRegistry'], [CategoryRegistry::class]));
+                GeneralUtility::setSingletonInstance(
+                    CategoryRegistry::class,
+                    unserialize(
+                        $cacheData['categoryRegistry'],
+                        ['allowed_classes' => [CategoryRegistry::class]]
+                    )
+                );
             } else {
                 static::buildBaseTcaFromSingleFiles();
                 static::createBaseTcaCacheFile();