[PR #12198] [MERGED] Update DQL arbitrary joins to use the ON keyword instead of WITH #13570

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

📋 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.xHead: arbitrary_join_on


📝 Commits (1)

  • 587caf8 Update 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.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/12198 **Author:** [@stof](https://github.com/stof) **Created:** 10/7/2025 **Status:** ✅ Merged **Merged:** 10/25/2025 **Merged by:** [@stof](https://github.com/stof) **Base:** `3.6.x` ← **Head:** `arbitrary_join_on` --- ### 📝 Commits (1) - [`587caf8`](https://github.com/doctrine/orm/commit/587caf88a753d8573f7e44cdae76200731e033ce) Update DQL arbitrary joins to use the ON keyword instead of WITH ### 📊 Changes **14 files changed** (+77 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:17:35 +01:00
admin closed this issue 2026-01-22 16:17:35 +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#13570