[PR #12222] Add ORDER BY clause to SELECT query #13595

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

Original Pull Request: https://github.com/doctrine/orm/pull/12222

State: closed
Merged: Yes


The order of results is not guaranteed unless we do so, and the test can fail in some cases:

There was 1 failure:

1) Doctrine\Tests\ORM\Functional\QueryTest::testToIterableWithMixedResultArbitraryJoinsScalars
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Doctrine 2'
+'lala 2'

/home/runner/work/orm/orm/tests/Tests/ORM/Functional/QueryTest.php:481

Spotted in https://github.com/doctrine/orm/actions/runs/18431080849/job/52518538835?pr=12221

**Original Pull Request:** https://github.com/doctrine/orm/pull/12222 **State:** closed **Merged:** Yes --- The order of results is not guaranteed unless we do so, and the test can fail in some cases: There was 1 failure: 1) Doctrine\Tests\ORM\Functional\QueryTest::testToIterableWithMixedResultArbitraryJoinsScalars Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'Doctrine 2' +'lala 2' /home/runner/work/orm/orm/tests/Tests/ORM/Functional/QueryTest.php:481 Spotted in https://github.com/doctrine/orm/actions/runs/18431080849/job/52518538835?pr=12221
admin added the pull-request label 2026-01-22 16:17:42 +01:00
admin closed this issue 2026-01-22 16:17:42 +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#13595