Skip to content

Conversation

@stchr
Copy link

@stchr stchr commented Feb 4, 2026

@stchr stchr marked this pull request as ready for review February 4, 2026 08:49
@greg0ire
Copy link
Member

greg0ire commented Feb 4, 2026

This kind of change should target 4.2.x

@GromNaN
Copy link
Member

GromNaN commented Feb 4, 2026

This kind of change should target 4.2.x

I agree.

This is an additional constraint added to this methods. Do all implementations in Doctrine projects return a list?

The list type must be also in Doctrine ODM EntityPersister::loadAll() that is called by EntityRepository::findBy()

This needs to be explored, it might be an indexed array in certain conditions?
https://github.com/doctrine/orm/blob/4262eb495b4d2a53b45de1ac58881e0091f2970f/src/Internal/Hydration/ObjectHydrator.php#L508

@stof
Copy link
Member

stof commented Feb 4, 2026

@GromNaN the repository methods don't allow asking for indexed results (the ObjectHydrator indeed does not always return a list, it depends on the result set mapping).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants