Place DQL in front of QueryBuilder again #5022
Labels
actionable
Clear and specific issues ready for anyone to take them.
Doctrine
good first issue
Ideal for your first contribution! (some Symfony experience may be required)
hasPR
A Pull Request has already been submitted for this issue.
A year ago, we decided to move the QueryBuilder section above the DQL section for the following reason:
However, I would propose to revert this to DQL before QueryBuilder now. For some reason:
SELECT ... FROM ... WHERE ...
, QueryBuilder takes up more lines, has a strange API syntax and isn't easy to followOn IRC, the first answer when someone asks something about the QueryBuilder is often "try DQL" and in 9 of the 10 cases, it solves the issue. Besides this, once a week someone joins and asks "how can I do this SQL with QueryBuilder?"
I recently had a discussion about when a query builder made sense and it was really hard to find a good situation. In fact, the only thing I can think of is in a case where the query is build dynamically (based on PHP statements) and isn't very complex.
The text was updated successfully, but these errors were encountered: