1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Ray\Di; |
||
6 | |||
7 | use function assert; |
||
8 | use function implode; |
||
9 | use function serialize; |
||
10 | use function sort; |
||
11 | use function sprintf; |
||
12 | use function unserialize; |
||
13 | |||
14 | use const PHP_EOL; |
||
15 | |||
16 | /** |
||
17 | * @psalm-import-type PointcutList from Types |
||
18 | */ |
||
19 | final class ModuleString |
||
20 | { |
||
21 | /** |
||
22 | * @param PointcutList $pointcuts |
||
0 ignored issues
–
show
|
|||
23 | */ |
||
24 | public function __invoke(Container $container, array $pointcuts): string |
||
25 | { |
||
26 | $log = []; |
||
27 | /** @psalm-suppress MixedAssignment */ |
||
28 | $container = unserialize(serialize($container), ['allowed_classes' => true]); |
||
29 | assert($container instanceof Container); |
||
30 | $spy = new SpyCompiler(); |
||
31 | foreach ($container->getContainer() as $dependencyIndex => $dependency) { |
||
32 | if ($dependency instanceof Dependency) { |
||
33 | $dependency->weaveAspects($spy, $pointcuts); |
||
34 | } |
||
35 | |||
36 | $log[] = sprintf( |
||
37 | '%s => %s', |
||
38 | $dependencyIndex, |
||
39 | (string) $dependency |
||
40 | ); |
||
41 | } |
||
42 | |||
43 | sort($log); |
||
44 | |||
45 | return implode(PHP_EOL, $log); |
||
46 | } |
||
47 | } |
||
48 |
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