Skip to content

Add ORDER BY clause to SELECT query#12222

Merged
SenseException merged 1 commit intodoctrine:3.5.xfrom
greg0ire:unflaky
Oct 12, 2025
Merged

Add ORDER BY clause to SELECT query#12222
SenseException merged 1 commit intodoctrine:3.5.xfrom
greg0ire:unflaky

Conversation

@greg0ire
Copy link
Copy Markdown
Member

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

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
@SenseException SenseException merged commit cf11f1e into doctrine:3.5.x Oct 12, 2025
84 checks passed
@greg0ire greg0ire deleted the unflaky branch October 12, 2025 06:31
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Nov 23, 2025
In doctrine#12222, I thought wrongly thought
the issue I was fixing only affected one test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants