|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace App; |
|
6
|
|
|
|
|
7
|
|
|
use App\Infrastructure\Common\BusPass; |
|
8
|
|
|
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; |
|
|
|
|
|
|
9
|
|
|
use Prooph\Bundle\EventStore\ProophEventStoreBundle; |
|
|
|
|
|
|
10
|
|
|
use Prooph\Bundle\ServiceBus\ProophServiceBusBundle; |
|
|
|
|
|
|
11
|
|
|
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; |
|
|
|
|
|
|
12
|
|
|
use Symfony\Bundle\MonologBundle\MonologBundle; |
|
|
|
|
|
|
13
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface; |
|
|
|
|
|
|
14
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
|
|
|
|
|
15
|
|
|
use Symfony\Component\HttpKernel\Kernel as BaseKernel; |
|
|
|
|
|
|
16
|
|
|
use Symfony\Component\Routing\RouteCollectionBuilder; |
|
|
|
|
|
|
17
|
|
|
|
|
18
|
|
|
class Kernel extends BaseKernel |
|
19
|
|
|
{ |
|
20
|
|
|
use MicroKernelTrait; |
|
21
|
|
|
|
|
22
|
|
|
public function registerBundles(): array |
|
23
|
|
|
{ |
|
24
|
|
|
$bundles = [ |
|
25
|
|
|
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), |
|
|
|
|
|
|
26
|
|
|
new MonologBundle(), |
|
27
|
|
|
new DoctrineBundle(), |
|
28
|
|
|
new ProophEventStoreBundle(), |
|
29
|
|
|
new ProophServiceBusBundle(), |
|
30
|
|
|
]; |
|
31
|
|
|
|
|
32
|
|
|
// if ($this->getEnvironment() == 'dev') { |
|
33
|
|
|
// |
|
34
|
|
|
// } |
|
35
|
|
|
|
|
36
|
|
|
return $bundles; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader): void |
|
40
|
|
|
{ |
|
41
|
|
|
$loader->load(__DIR__.'/../config/package/framework.yaml'); |
|
42
|
|
|
$loader->load(__DIR__.'/../config/package/monolog.yaml'); |
|
43
|
|
|
$loader->load(__DIR__.'/../config/package/doctrine.yaml'); |
|
44
|
|
|
$loader->load(__DIR__.'/../config/package/prooph_event_store.yaml'); |
|
45
|
|
|
$loader->load(__DIR__.'/../config/package/prooph_service_bus.yaml'); |
|
46
|
|
|
$loader->load(__DIR__.'/../config/services.yml'); |
|
47
|
|
|
|
|
48
|
|
|
// configure WebProfilerBundle only if the bundle is enabled |
|
49
|
|
|
if (isset($this->bundles['WebProfilerBundle'])) { |
|
50
|
|
|
$c->loadFromExtension('web_profiler', [ |
|
51
|
|
|
'toolbar' => true, |
|
52
|
|
|
'intercept_redirects' => false, |
|
53
|
|
|
]); |
|
54
|
|
|
} |
|
55
|
|
|
$c->addCompilerPass(new BusPass()); |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
protected function configureRoutes(RouteCollectionBuilder $routes): string |
|
59
|
|
|
{ |
|
60
|
|
|
// load the annotation routes |
|
61
|
|
|
// $routes->import(__DIR__.'/../src/Controller/', '/', 'annotation'); |
|
62
|
|
|
} |
|
|
|
|
|
|
63
|
|
|
|
|
64
|
|
|
// optional, to use the standard Symfony cache directory |
|
65
|
|
|
public function getCacheDir() |
|
66
|
|
|
{ |
|
67
|
|
|
return __DIR__.'/../var/cache/'.$this->getEnvironment(); |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
// optional, to use the standard Symfony logs directory |
|
71
|
|
|
public function getLogDir() |
|
72
|
|
|
{ |
|
73
|
|
|
return __DIR__.'/../var/log'; |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
public function boot(): ?Kernel |
|
77
|
|
|
{ |
|
78
|
|
|
return parent::boot(); // TODO: Change the autogenerated stub |
|
79
|
|
|
} |
|
80
|
|
|
} |
|
81
|
|
|
|
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