Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
27 | public function process(ContainerBuilder $container) |
||
28 | { |
||
29 | if (!$container->hasParameter('swp_updater.monolog_channel')) { |
||
30 | return; |
||
31 | } |
||
32 | |||
33 | $bundles = $container->getParameter('kernel.bundles'); |
||
34 | |||
35 | if (!array_key_exists('MonologBundle', $bundles)) { |
||
36 | throw new RuntimeException( |
||
37 | 'You have enabled the "monolog_channel" option but the MonologBundle is not registered' |
||
38 | ); |
||
39 | } |
||
40 | |||
41 | $loaderDef = $container->getDefinition('swp_updater.manager'); |
||
42 | $loaderDef->addArgument(new Reference('monolog.logger.updater')); |
||
43 | } |
||
44 | } |
||
45 |