Bug #103402
closedMisleading error on broken DI container
100%
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
Updated by Andreas Kienast 8 months ago
- Related to Feature #102586: Introduce sortable Doctrine DBAL middleware registration added
Updated by Gerrit Code Review 8 months ago
- Status changed from In Progress to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83471
Updated by Gerrit Code Review 8 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83472
Updated by Andreas Fernandez 8 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5166cca9d50444f7aa76ccaafbb37ab2068c71b0.