findAll and findBy should return list#498
Conversation
https://github.com/doctrine/orm/blob/3.6.x/src/EntityRepository.php already has this narrowed return type
https://github.com/doctrine/orm/blob/3.6.x/src/EntityRepository.php already has this narrowed return type
|
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 This needs to be explored, it might be an indexed array in certain conditions? |
|
@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). |
|
Then I guess the ORM types should be fixed? If yes, targeting the patch branch of ORM would be the correct thing to do. |
|
@greg0ire why ? The |
|
Sorry, I got confused, |
|
Thanks for all the input, highly appreciated! |
|
closed in favor of #499, thanks a lot! |
https://github.com/doctrine/orm/blob/3.6.x/src/EntityRepository.php already has this narrowed return type