[PR #11813] [RFC] Expose QueryBuilder::getType #13276

Closed
opened 2026-01-22 16:16:42 +01:00 by admin · 0 comments
Owner

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

State: closed
Merged: Yes


I have an implementation where I extends the QueryBuilder in order to provide extra methods.
In one of them, I'd like an easy way to know if the queryBuilder is creating a select, an update or a delete query.

I could extends select, addSelect, update and delete to keep a state with the type of the current query, but it seems like the QueryBuilder already does this. So I'd like to expose this information.

Are you okay with this ?

**Original Pull Request:** https://github.com/doctrine/orm/pull/11813 **State:** closed **Merged:** Yes --- I have an implementation where I extends the QueryBuilder in order to provide extra methods. In one of them, I'd like an easy way to know if the queryBuilder is creating a select, an update or a delete query. I could extends `select`, `addSelect`, `update` and `delete` to keep a state with the type of the current query, but it seems like the QueryBuilder already does this. So I'd like to expose this information. Are you okay with this ?
admin added the pull-request label 2026-01-22 16:16:42 +01:00
admin closed this issue 2026-01-22 16:16:42 +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#13276