[PR #11269] docs: recommend safer way to disable logging #12897

Open
opened 2026-01-22 16:15:32 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/11269

State: closed
Merged: Yes


Resetting the middlewares on the configuration object will only work if the connection object hasn't been built from that configuration object yet. Instead, people should find the logger bound to the logging middleware and disable it.

Note: I think that with Symfony, another solution might be to have this bundle configuration:

dbal:
    regular_connection:
        logging: true
    batch_connection:
        logging: false

Let me know what you think.

**Original Pull Request:** https://github.com/doctrine/orm/pull/11269 **State:** closed **Merged:** Yes --- Resetting the middlewares on the configuration object will only work if the connection object hasn't been built from that configuration object yet. Instead, people should find the logger bound to the logging middleware and disable it. Note: I think that with Symfony, another solution might be to have this bundle configuration: ```yaml dbal: regular_connection: logging: true batch_connection: logging: false ``` Let me know what you think.
admin added the pull-request label 2026-01-22 16:15:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#12897