| Conditions | 6 |
| Paths | 24 |
| Total Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function process(ContainerBuilder $container): void |
||
| 26 | { |
||
| 27 | $caches = []; |
||
| 28 | |||
| 29 | foreach ($container->findTaggedServiceIds('sonata.cache') as $id => $attributes) { |
||
| 30 | if (!$container->hasDefinition($id)) { |
||
| 31 | continue; |
||
| 32 | } |
||
| 33 | |||
| 34 | $caches[$id] = new Reference($id); |
||
| 35 | } |
||
| 36 | |||
| 37 | if ($container->hasDefinition('sonata.cache.orm.event_subscriber.default')) { |
||
| 38 | $container->getDefinition('sonata.cache.orm.event_subscriber.default') |
||
| 39 | ->replaceArgument(1, $caches); |
||
| 40 | } |
||
| 41 | |||
| 42 | if ($container->hasDefinition('sonata.cache.phpcr_odm.event_subscriber.default')) { |
||
| 43 | $container->getDefinition('sonata.cache.phpcr_odm.event_subscriber.default') |
||
| 44 | ->replaceArgument(1, $caches); |
||
| 45 | } |
||
| 46 | |||
| 47 | if ($container->hasDefinition('sonata.cache.manager')) { |
||
| 48 | $container->getDefinition('sonata.cache.manager') |
||
| 49 | ->replaceArgument(1, $caches); |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 |