Project

General

Profile

Actions

Bug #103402

closed

Misleading error on broken DI container

Added by Andreas Kienast 8 months ago. Updated 4 months ago.

Status:
Closed
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 #1

Updated by Andreas Kienast 8 months ago

  • Related to Feature #102586: Introduce sortable Doctrine DBAL middleware registration added
Actions #2

Updated by Andreas Kienast 8 months ago

  • Description updated (diff)
Actions #3

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

Actions #4

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

Actions #5

Updated by Andreas Fernandez 8 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF