Skip to content

Config-based support for custom repository classes #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stof opened this issue Jul 25, 2018 · 2 comments
Closed

Config-based support for custom repository classes #32

stof opened this issue Jul 25, 2018 · 2 comments

Comments

@stof
Copy link
Contributor

stof commented Jul 25, 2018

As the PoC of #18 seems stalled to resolve custom repository classes based on the mapping, a simpler solution could be implemented in the meantime (even though it is not as good for DX as it requires more work). Instead of configuring a single repository class used by all entities, we could configure a mapping of entity classes to their repositories (the existing option can of course still be kept for the fallback for entities not present in the map):

parameters:
        doctrine:
                customRepositories:
                        MyApp\Entity\User: MyApp\Doctrine\UserRepository
                        MyApp\Entity\Team: MyApp\Doctrine\TeamRepository
                repositoryClass: MyApp\Doctrine\BetterEntityRepository

What do you think about that solution ?

@ondrejmirtes
Copy link
Member

Hi, I'd rather have someone finish the work on #18 rather than investing in something like this. Can you take over the work?

@github-actions
Copy link

github-actions bot commented May 2, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants