[PR #1112] DefaultRepositoryFactory: single repository for aliased entities #9169

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

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

State: closed
Merged: Yes


The actual implementation of DefaultRepositoryFactory create multiple instances for a single entity if is accessed by multiple namespace aliases.

I've patched DefaultRepositoryFactory::getRepository so that aliases are resolved before saving the reference into the repositoryList.

Just to not affect performance of existing implementation, I've added to the repositoryList both the aliased class name and the fully-qualified class name, but only the latter is required.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1112 **State:** closed **Merged:** Yes --- The actual implementation of `DefaultRepositoryFactory` create multiple instances for a single entity if is accessed by multiple namespace aliases. I've patched `DefaultRepositoryFactory::getRepository` so that aliases are resolved before saving the reference into the `repositoryList`. ~~Just to not affect performance of existing implementation, I've added to the `repositoryList` both the aliased class name and the fully-qualified class name, but only the latter is required.~~
admin added the pull-request label 2026-01-22 16:03:27 +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#9169