phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

Idea - Autowire service repositories using a typed interfaced and their FQDN.

Open drupol opened this issue 3 years ago • 0 comments

Hello,

Today I've been asked if it would be possible to inject repositories using typed interfaces and based on their FQDN.

A bit like the Monolog Bundle and their logger / channels. (https://symfony.com/doc/current/logging/channels_handlers.html#monolog-autowire-channels)

I made a bundle out of it, you can find it here: https://github.com/loophp/service-object-repository-bundle

Do you think it would be a good addition in symfony/doctrine-bundle ?

Let me know what, I'm ready to provide the PR for this if you find it useful.

drupol avatar Jun 04 '21 15:06 drupol