Issues (2)

DependencyInjection/DeamonLoggerExtraExtension.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Deamon\LoggerExtraBundle\DependencyInjection;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
0 ignored issues
show
The type Symfony\Component\Depend...ection\ContainerBuilder was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Symfony\Component\DependencyInjection\Loader;
8
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
9
10
/**
11
 * This is the class that loads and manages your bundle configuration.
12
 *
13
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
14
 */
15
class DeamonLoggerExtraExtension extends Extension
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 3
    public function load(array $configs, ContainerBuilder $container): void
21
    {
22 3
        $configuration = new Configuration();
23 3
        $config = $this->processConfiguration($configuration, $configs);
24
25 3
        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
0 ignored issues
show
The type Symfony\Component\Depend...on\Loader\XmlFileLoader was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
26 3
        $loader->load('services.xml');
27 3
        $loader->load('processors.xml');
28
29 3
        $definition = $container->getDefinition('deamon.logger_extra.context');
30 3
        $definition->addArgument($config['application']['name']);
31 3
        $definition->addArgument($config['application']['locale']);
32 3
        $definition->addArgument($config['application']['version']);
33
34 3
        $definition = $container->getDefinition('deamon.logger_extra.processors.web_processor');
35 3
        $definition->addArgument($config['config']);
36
37 3
        $definition->clearTag('monolog.processor');
38 3
        foreach ($config['handlers'] as $handler) {
39 3
            $definition->addTag('monolog.processor', ['handler' => $handler]);
40
        }
41
    }
42
}
43