Actions
Bug #88843
closedRegistering a hook for tcaIsBeingBuilt triggers LogicException
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-07-25
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Description
I've just tried the newly released TYPO3 v10 and stumbled upon an exception.
When you register a Slot for the Signal tcaIsBeingBuilt
in your ext_localconf, you will get a LogicException in TYPO3 v10.0.0:
$signalSlotDispatcher->connect(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::class, 'tcaIsBeingBuilt', \Example\ExampleExtension\TCA::class, 'addTCA');
The Exception is:
(1/1) #1549446998 LogicException
TYPO3\CMS\Core\Cache\CacheManager can not be injected/instantiated during ext_localconf.php loading. Use lazy loading instead.
This apparently happens when the signal is dispatched via Extbase. An ObjectManager is created which would get a CacheManager:
Dispatcher.php#L126
Actions