Actions
Bug #103402
closedMisleading error on broken DI container
Start date:
2024-03-15
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
When the DI container is stale (e.g. missing classes, happens often during development), an exception is thrown and the DI container becomes unavailable. However, the thrown exception is attempted to be logged in the database which doesn't work anymore, as ConnectionPool->getOrderedConnectionDriverMiddlewareConfiguration()
instantiates DriverMiddlewareService
, which has additional dependencies. Since those cannot get loaded due to the missing container, a follow-up error is thrown, hiding the real issue.
Fatal error: Uncaught ArgumentCountError: Too few arguments to function TYPO3\CMS\Core\Database\DriverMiddlewareService::__construct(), 0 passed in /var/www/html/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 2804 and exactly 1 expected in /var/www/html/typo3_src/typo3/sysext/core/Classes/Database/DriverMiddlewareService.php on line 27 ArgumentCountError: Too few arguments to function TYPO3\CMS\Core\Database\DriverMiddlewareService::__construct(), 0 passed in /var/www/html/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 2804 and exactly 1 expected in /var/www/html/typo3_src/typo3/sysext/core/Classes/Database/DriverMiddlewareService.php on line 27
Actions