sensiolabs/SensioFrameworkExtraBundle — pull request #265 by lemoinem (2014-01-03 00:52:12+00:00)
Title: [ParamConverter] Allow DoctrineParamConverter to be provided a global default Entity Manager name

The current implementation of DoctrineParamConverter allows to specify an entity_manager to use on a per-ParamConverter basis, but most of the time, the wanted behaviour is to specify it globally.

My use case for this is as follows:
I have to Object Managers (actually working with the MongoDB ODM here, but that doesn't matter), some classes are mapped by both and the mapper doesn't use the right one (i.e. the one I would want, most of the time). I would thus like to be able to specify a default object manager name across my application.

This PR allow to do so using via Dependency Injection. It's use is optional and does not impact the previous behaviour in any way (except an additional assignment and a test which seem negligible).

I also provided an additional test-case for the new behaviour.