1 | <?php |
||
2 | |||
3 | namespace App; |
||
4 | |||
5 | use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; |
||
0 ignored issues
–
show
|
|||
6 | use Symfony\Component\Config\Loader\LoaderInterface; |
||
0 ignored issues
–
show
The type
Symfony\Component\Config\Loader\LoaderInterface 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
7 | 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
8 | use Symfony\Component\HttpKernel\Kernel as BaseKernel; |
||
0 ignored issues
–
show
The type
Symfony\Component\HttpKernel\Kernel 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
9 | use Symfony\Component\Routing\RouteCollectionBuilder; |
||
0 ignored issues
–
show
The type
Symfony\Component\Routing\RouteCollectionBuilder 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
10 | |||
11 | /** |
||
12 | * Class Kernel |
||
13 | * |
||
14 | * @package App |
||
15 | */ |
||
16 | class Kernel extends BaseKernel |
||
17 | { |
||
18 | use MicroKernelTrait; |
||
19 | |||
20 | /** |
||
21 | * @const string |
||
22 | */ |
||
23 | const CONFIG_EXTS = '.{php,xml,yaml,yml}'; |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | public function getCacheDir() |
||
29 | { |
||
30 | return $this->getProjectDir().'/var/cache/'.$this->environment; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function getLogDir() |
||
37 | { |
||
38 | return $this->getProjectDir().'/var/log'; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function registerBundles() |
||
45 | { |
||
46 | $contents = require $this->getProjectDir().'/config/bundles.php'; |
||
47 | |||
48 | foreach ($contents as $class => $envs) { |
||
49 | if (isset($envs['all']) || isset($envs[$this->environment])) { |
||
50 | yield new $class(); |
||
51 | } |
||
52 | } |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader) |
||
59 | { |
||
60 | $container->setParameter('container.autowiring.strict_mode', true); |
||
61 | $container->setParameter('container.dumper.inline_class_loader', true); |
||
62 | $confDir = $this->getProjectDir().'/config'; |
||
63 | $loader->load($confDir.'/packages/*'.self::CONFIG_EXTS, 'glob'); |
||
64 | |||
65 | if (is_dir($confDir.'/packages/'.$this->environment)) { |
||
66 | $loader->load($confDir.'/packages/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob'); |
||
67 | } |
||
68 | |||
69 | $loader->load($confDir.'/services'.self::CONFIG_EXTS, 'glob'); |
||
70 | $loader->load($confDir.'/services_'.$this->environment.self::CONFIG_EXTS, 'glob'); |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | protected function configureRoutes(RouteCollectionBuilder $routes) |
||
77 | { |
||
78 | $confDir = $this->getProjectDir().'/config'; |
||
79 | |||
80 | if (is_dir($confDir.'/routes/')) { |
||
81 | $routes->import($confDir.'/routes/*'.self::CONFIG_EXTS, '/', 'glob'); |
||
82 | } |
||
83 | |||
84 | if (is_dir($confDir.'/routes/'.$this->environment)) { |
||
85 | $routes->import($confDir.'/routes/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob'); |
||
86 | } |
||
87 | |||
88 | $routes->import($confDir.'/routes'.self::CONFIG_EXTS, '/', 'glob'); |
||
89 | } |
||
90 | } |
||
91 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths