-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected
6.4
Description
When using Doctrine Messenger with a Firebird database, we encounter an issue related to column names returned by the database. Firebird returns all column names in UPPERCASE by default (e.g., ID instead of id). However, the Doctrine Messenger component seems to expect column names in lowercase, leading to failures during message processing.
How to reproduce
- Configure a Symfony project with Doctrine Messenger and a Firebird database.
- Store a message in a queue-backed table.
- Start the Messenger worker or otherwise process the queue.
- Observe errors related to column name resolution (due to case mismatch).
Possible Solution
in Symfony\Component\Messenger\Bridge\Doctrine\Transport\Connection
change method decodeEnvelopeHeaders
to
private function decodeEnvelopeHeaders(array $doctrineEnvelope): array
{
$doctrineEnvelope = array_change_key_case($doctrineEnvelope, CASE_LOWER);
$doctrineEnvelope['headers'] = json_decode($doctrineEnvelope['headers'], true);
return $doctrineEnvelope;
}
Additional Context
After investigation, there appears to be no option in the Firebird DBAL driver to control the case of returned column names. This means there is no straightforward way to configure the driver or connection to return column names in lowercase for compatibility.