1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* This file is part of the G.L.S.R. Apps package. |
7
|
|
|
* |
8
|
|
|
* (c) Dev-Int Création <[email protected]>. |
9
|
|
|
* |
10
|
|
|
* For the full copyright and license information, please view the LICENSE |
11
|
|
|
* file that was distributed with this source code. |
12
|
|
|
*/ |
13
|
|
|
|
14
|
|
|
namespace Core\Infrastructure; |
15
|
|
|
|
16
|
|
|
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; |
|
|
|
|
17
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface; |
|
|
|
|
18
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
|
|
|
|
19
|
|
|
use Symfony\Component\HttpKernel\Kernel as BaseKernel; |
|
|
|
|
20
|
|
|
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; |
|
|
|
|
21
|
|
|
|
22
|
|
|
class Kernel extends BaseKernel |
23
|
|
|
{ |
24
|
|
|
use MicroKernelTrait; |
25
|
|
|
|
26
|
|
|
protected function configureContainer(ContainerConfigurator $container, LoaderInterface $loader): void |
27
|
|
|
{ |
28
|
|
|
$container->import('../../../config/{packages}/*.yaml'); |
29
|
|
|
$container->import('../../../config/{packages}/' . $this->environment . '/*.yaml'); |
30
|
|
|
|
31
|
|
|
if (\is_file(\dirname(__DIR__, 3) . '/config/services.yaml')) { |
32
|
|
|
$container->import('../../../config/services.yaml'); |
33
|
|
|
$container->import('../../../config/{services}_' . $this->environment . '.yaml'); |
34
|
|
|
} elseif (\is_file($path = \dirname(__DIR__, 3) . '/config/services.php')) { |
35
|
|
|
(require $path)($container->withPath($path), $this); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
$loader->load($this->getProjectDir() . '/src/**/Infrastructure/Symfony/Resources/config/services.yaml', 'glob'); |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
protected function configureRoutes(RoutingConfigurator $routes): void |
42
|
|
|
{ |
43
|
|
|
$routes->import('../../../config/{routes}/' . $this->environment . '/*.yaml'); |
44
|
|
|
$routes->import('../../../config/{routes}/*.yaml'); |
45
|
|
|
$routes->import($this->getProjectDir() . '/src/**/Infrastructure/Symfony/Resources/config/routes.yaml', 'glob'); |
46
|
|
|
|
47
|
|
|
if (\is_file(\dirname(__DIR__, 3) . '/config/routes.yaml')) { |
48
|
|
|
$routes->import('../../../config/routes.yaml'); |
49
|
|
|
} elseif (\is_file($path = \dirname(__DIR__, 3) . '/config/routes.php')) { |
50
|
|
|
(require $path)($routes->withPath($path), $this); |
51
|
|
|
} |
52
|
|
|
} |
53
|
|
|
} |
54
|
|
|
|
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