Issue Bug Under Review

#111506missing int cast in DoctrineTransportFactory

Anja Leichsenring 11/19/26, 09:24 updated 11/19/26, 14:00

Description

if in ddev, the port of the DB-connection is sometimes given as a string.
ConnectionPool casts it, DoctrineTransportFactory does not. This fails with “mysqli::real_connect(): Argument #5 ($port) must be of type ?int, string given” for any message sent to the message bus.

- Cast present: vendor/typo3/cms-core/Classes/Database/ConnectionPool.php:170-173. Under the comment “Ensure integer value for port”, it runs $connectionParams[‘port’] = (int)($connectionParams[‘port’] ?? 0);.
- Cast missing: vendor/typo3/cms-core/Classes/Messenger/DoctrineTransportFactory.php:41. It runs DriverManager::getConnection($GLOBALS[‘TYPO3_CONF_VARS’][‘DB’][‘Connections’][‘Default’]); and passes the configuration through unchanged.

Happens when running

Symfony\Component\Messenger\MessageBusInterface->dispatch()

Reviews 1

History 13