Skip to content

Doctrine Messenger: Firebird database returns column names in uppercase – incompatibility with expected lowercase columns #61171

@DSsatwareAG

Description

@DSsatwareAG

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions