Skip to content

[GH-9219] Add support for toIterable over mixed or scalar results.#12187

Merged
beberlei merged 3 commits intodoctrine:2.20.xfrom
beberlei:GH-9219-ToIterableMixed
Oct 8, 2025
Merged

[GH-9219] Add support for toIterable over mixed or scalar results.#12187
beberlei merged 3 commits intodoctrine:2.20.xfrom
beberlei:GH-9219-ToIterableMixed

Conversation

@beberlei
Copy link
Copy Markdown
Member

@beberlei beberlei commented Oct 7, 2025

AbstractHydrator::hydrateRowData will return $result in a very weird way based on combinations of objects, cross joined objects or scalar results. This is already "worked on" in AbstractHydrator::toIterable but it needs a bunch more molding to make scalar results and multiple object results work.

Fixes #9219
Fixes #8520

@@ -403,11 +403,126 @@ public function testToIterableWithMultipleSelectElements(): void

public function testToIterableWithMixedResultIsNotAllowed(): void
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test names must be updated to reflect what they actually cover

@beberlei beberlei merged commit a939dc2 into doctrine:2.20.x Oct 8, 2025
74 checks passed
@mpdude mpdude mentioned this pull request Oct 9, 2025
@greg0ire greg0ire added this to the 2.20.7 milestone Oct 27, 2025
@greg0ire greg0ire added the Bug label Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants