| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function process(ContainerBuilder $container) |
||
| 29 | { |
||
| 30 | if (!$container->hasDefinition('doctrine.orm.container_repository_factory')) { |
||
| 31 | return; |
||
| 32 | } |
||
| 33 | |||
| 34 | $locatorDef = $container->findDefinition($container->getDefinition('doctrine.orm.container_repository_factory')->getArgument(0)); |
||
| 35 | $repoServiceIds = array_keys($container->findTaggedServiceIds('doctrine.repository_service')); |
||
| 36 | $repoReferences = array_map(function($id) { |
||
| 37 | return new Reference($id); |
||
| 38 | }, $repoServiceIds); |
||
| 39 | $locatorDef->replaceArgument(0, array_combine($repoServiceIds, $repoReferences)); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |