Project

General

Profile

Actions

Bug #103402

closed

Misleading error on broken DI container

Added by Andreas Kienast 2 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
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

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #102586: Introduce sortable Doctrine DBAL middleware registrationClosedStefan Bürk2023-12-02

Actions
Actions

Also available in: Atom PDF