Skip to content

DoctrineTransport utilizes read-only method to write messages. #37220

@tylerhcarter

Description

@tylerhcarter

Symfony version(s) affected: 5.0.9

Description
DoctrineTransport utilizes executeQuery to write a message to the database. executeQuery is meant to be read-only, and when using a MasterSlaveConnection, this can cause the message to be written to a read-only database.

How to reproduce

  1. Configure a MasterSlaveConnection with a slave going to a read-only database.
  2. Send a message to a DoctrineTransport configured transport.

Possible Solution
Utilize executeUpdate, which is intended for INSERT commands.

Additional context
Courtesy of @christickner in Symfony Devs #support

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugGood first issueIdeal for your first contribution! (some Symfony experience may be required)Help wantedIssues and PRs which are looking for volunteers to complete them.MessengerStatus: Needs Review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions