DDC-2141: Query should not be final #2693

Closed
opened 2026-01-22 14:00:48 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Nov 13, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user tarjei:

The Query class should not be marked final as this makes it impossible to Mock it.

Originally created by @doctrinebot on GitHub (Nov 13, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user tarjei: The Query class should not be marked final as this makes it impossible to Mock it.
admin added the Improvement label 2026-01-22 14:00:48 +01:00
admin closed this issue 2026-01-22 14:00:49 +01:00
Author
Owner

@beberlei commented on GitHub (Dec 5, 2020):

Mocking query with its fluent interface is really hard, as such the final discourages that you put yourself in the position. Put a facade or repository in front of the query and mock that.

@beberlei commented on GitHub (Dec 5, 2020): Mocking query with its fluent interface is really hard, as such the final discourages that you put yourself in the position. Put a facade or repository in front of the query and mock that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2693