[PR #9104] Changed EntityRepository count method $criteria parameter to optional #11372

Open
opened 2026-01-22 16:10:33 +01:00 by admin · 0 comments
Owner

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

State: closed
Merged: Yes


Currently to get count of all items there is need to provide empty array to count() method as $criteria parameter is required.
I believe there shouldn't be a need to provide it if I want to count all Entities without any criteria.

**Original Pull Request:** https://github.com/doctrine/orm/pull/9104 **State:** closed **Merged:** Yes --- Currently to get count of all items there is need to provide empty array to count() method as $criteria parameter is required. I believe there shouldn't be a need to provide it if I want to count all Entities without any criteria.
admin added the pull-request label 2026-01-22 16:10:33 +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#11372