[PR #7997] Update Interface ObjectRepository newer Namespace #10756

Closed
opened 2026-01-22 16:08:35 +01:00 by admin · 0 comments
Owner

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

State: closed
Merged: No


The class Doctrine\ORM\EntityRepository implements Doctrine\Common\Persistence\ObjectRepository which itself is deprecated already since version 1.3 as its namespace changed. The interface itself hasn't changed and is emulated by providing a class alias to its new namespaced version at \Doctrine\Persistence\ObjectRepository.

This makes type hinting with the new interface not possible. Therefore, and because its original namespace has been deprecated for quite some time, Doctrine\ORM\EntityRepository should be used.

**Original Pull Request:** https://github.com/doctrine/orm/pull/7997 **State:** closed **Merged:** No --- The class `Doctrine\ORM\EntityRepository` implements `Doctrine\Common\Persistence\ObjectRepository` which itself is deprecated already since version 1.3 as its namespace changed. The interface itself hasn't changed and is emulated by providing a class alias to its new namespaced version at `\Doctrine\Persistence\ObjectRepository`. This makes type hinting with the new interface not possible. Therefore, and because its original namespace has been deprecated for quite some time, `Doctrine\ORM\EntityRepository` should be used.
admin added the pull-request label 2026-01-22 16:08:35 +01:00
admin closed this issue 2026-01-22 16:08:36 +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#10756