Deprecate DELETE DQLs without alias #5899

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

Originally created by @lcobucci on GitHub (Feb 26, 2018).

Before v2.6.0 we were accepting DELETE DQLs (via QueryBuilder and directly using EntityManager#createQuery()) without alias, even though our grammar was requiring it. In v2.6.0 we fixed the parsing and started to emit errors, which is a BC-break.

#7077 fixes the break but we should emit deprecation notices for that, if we decide to not change the grammar - which was also challenged in that PR because JPA doesn't require the alias for bulk delete queries.

Originally created by @lcobucci on GitHub (Feb 26, 2018). Before `v2.6.0` we were accepting DELETE DQLs (via `QueryBuilder` and directly using `EntityManager#createQuery()`) without alias, even though our grammar was requiring it. In `v2.6.0` we fixed the parsing and started to emit errors, which is a BC-break. #7077 fixes the break but we should emit deprecation notices for that, if we decide to not change the grammar - which was also [challenged in that PR](https://github.com/doctrine/doctrine2/pull/7077#issuecomment-366557983) because JPA doesn't require the alias for bulk delete queries.
admin added the DocumentationDeprecation labels 2026-01-22 15:21: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#5899