SensioFrameworkExtraBundle icon indicating copy to clipboard operation
SensioFrameworkExtraBundle copied to clipboard

Standard usage of different entity manager per environment

Open retnek opened this issue 2 years ago • 0 comments

Hey,

We commonly use different database connections for different environments, e.g. sqlite for tests. As far as I know different connection means different entity manager in symfony. The question is, how should we use different entity managers for DoctrineParamConverter without explicitly set @ParamConverter's entity_manager annotation?

I've tried making a custom ParamConverter for this extending DoctrineParamConverter, but the only useful function, that resolves EntityManagerInterface is private (DoctrineParamConverter->getManager).

Thanks for the reply, Istvan

retnek avatar Aug 05 '21 07:08 retnek