1 | <?php |
||
2 | |||
3 | namespace InFw\TacticianAdapter; |
||
4 | |||
5 | use InFw\EventSourcing\Factory\EmitterFactory; |
||
0 ignored issues
–
show
|
|||
6 | use InFw\TacticianAdapter\Factory\CommandBusFactory; |
||
7 | use InFw\TacticianAdapter\Factory\HandlerLocatorFactory; |
||
8 | use InFw\TacticianAdapter\Factory\LoggerMiddlewareFactory; |
||
9 | use League\Event\EmitterInterface; |
||
10 | use League\Tactician\CommandBus; |
||
11 | use League\Tactician\CommandEvents\EventMiddleware; |
||
12 | use League\Tactician\Handler\CommandNameExtractor\ClassNameExtractor; |
||
13 | use League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor; |
||
14 | use League\Tactician\Handler\Locator\HandlerLocator; |
||
15 | use League\Tactician\Handler\MethodNameInflector\InvokeInflector; |
||
16 | use League\Tactician\Handler\MethodNameInflector\MethodNameInflector; |
||
17 | use League\Tactician\Logger\Formatter\ClassPropertiesFormatter; |
||
18 | use League\Tactician\Logger\Formatter\Formatter; |
||
19 | use League\Tactician\Logger\LoggerMiddleware; |
||
20 | use League\Tactician\Plugins\LockingMiddleware; |
||
21 | |||
22 | class ConfigProvider |
||
23 | { |
||
24 | public function __invoke() |
||
25 | { |
||
26 | return [ |
||
27 | 'command-bus' => $this->getBusConfig(), |
||
28 | 'dependencies' => $this->getDependencies(), |
||
29 | ]; |
||
30 | } |
||
31 | |||
32 | protected function getBusConfig() |
||
33 | { |
||
34 | return [ |
||
35 | 'locator' => HandlerLocator::class, |
||
36 | 'inflector' => MethodNameInflector::class, |
||
37 | 'extractor' => CommandNameExtractor::class, |
||
38 | 'formatter' => Formatter::class, |
||
39 | 'middleware' => [ |
||
40 | LockingMiddleware::class => LockingMiddleware::class, |
||
41 | LoggerMiddleware::class => LoggerMiddleware::class, |
||
42 | EventMiddleware::class => EventMiddleware::class, |
||
43 | ], |
||
44 | 'handler-map' => [], |
||
45 | ]; |
||
46 | } |
||
47 | |||
48 | protected function getDependencies() |
||
49 | { |
||
50 | return [ |
||
51 | 'invokables' => [ |
||
52 | Formatter::class => ClassPropertiesFormatter::class, |
||
53 | MethodNameInflector::class => InvokeInflector::class, |
||
54 | CommandNameExtractor::class => ClassNameExtractor::class, |
||
55 | LockingMiddleware::class => LockingMiddleware::class, |
||
56 | EventMiddleware::class => EventMiddleware::class, |
||
57 | ], |
||
58 | 'factories' => [ |
||
59 | EmitterInterface::class => EmitterFactory::class, |
||
60 | CommandBus::class => CommandBusFactory::class, |
||
61 | HandlerLocator::class => HandlerLocatorFactory::class, |
||
62 | LoggerMiddleware::class => LoggerMiddlewareFactory::class, |
||
63 | ], |
||
64 | 'aliases' => [ |
||
65 | \InFw\EventSourcing\EmitterInterface::class => EmitterInterface::class, |
||
66 | ], |
||
67 | ]; |
||
68 | } |
||
69 | } |
||
70 |
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