mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #12198] [MERGED] Update DQL arbitrary joins to use the ON keyword instead of WITH #13570
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/12198
Author: @stof
Created: 10/7/2025
Status: ✅ Merged
Merged: 10/25/2025
Merged by: @stof
Base:
3.6.x← Head:arbitrary_join_on📝 Commits (1)
587caf8Update DQL arbitrary joins to use the ON keyword instead of WITH📊 Changes
14 files changed (+77 additions, -41 deletions)
View changed files
📝
UPGRADE.md(+8 -0)📝
docs/en/reference/dql-doctrine-query-language.rst(+13 -6)📝
src/Query/Parser.php(+22 -13)📝
src/Query/TokenType.php(+1 -0)📝
tests/Tests/ORM/Functional/QueryTest.php(+3 -3)📝
tests/Tests/ORM/Functional/Ticket/DDC3042Test.php(+1 -1)📝
tests/Tests/ORM/Functional/Ticket/GH6362Test.php(+1 -1)📝
tests/Tests/ORM/Functional/Ticket/GH6464Test.php(+1 -1)📝
tests/Tests/ORM/Functional/Ticket/GH7496WithToIterableTest.php(+1 -1)📝
tests/Tests/ORM/Query/LanguageRecognitionTest.php(+12 -1)📝
tests/Tests/ORM/Query/SelectSqlGenerationTest.php(+9 -9)📝
tests/Tests/ORM/Tools/Pagination/CountWalkerTest.php(+1 -1)📝
tests/Tests/ORM/Tools/Pagination/LimitSubqueryWalkerTest.php(+2 -2)📝
tests/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php(+2 -2)📄 Description
DQL arbitrary joins are semantically equivalent to SQL joins, so using the same keyword reduces confusion. It also means that in next major version, the WITH keyword will only be about applying adhoc filtering on relations instead of having 2 responsibilities.
Closes https://github.com/doctrine/orm/issues/12192
Closes https://github.com/doctrine/orm/issues/7891 (the confusion is solved)
Closes https://github.com/doctrine/orm/issues/3544 (that constant now produces valid code)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.