1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Phel\Run; |
6
|
|
|
|
7
|
|
|
use Gacela\Framework\AbstractFactory; |
8
|
|
|
use Phel\Api\ApiFacadeInterface; |
9
|
|
|
use Phel\Build\BuildFacadeInterface; |
10
|
|
|
use Phel\Command\CommandFacadeInterface; |
11
|
|
|
use Phel\Compiler\CompilerFacadeInterface; |
12
|
|
|
use Phel\Printer\Printer; |
13
|
|
|
use Phel\Printer\PrinterInterface; |
14
|
|
|
use Phel\Run\Application\NamespaceRunner; |
|
|
|
|
15
|
|
|
use Phel\Run\Application\NamespacesLoader; |
|
|
|
|
16
|
|
|
use Phel\Run\Domain\Repl\ColorStyle; |
17
|
|
|
use Phel\Run\Domain\Repl\ColorStyleInterface; |
18
|
|
|
use Phel\Run\Domain\Repl\ReplCommandIoInterface; |
19
|
|
|
use Phel\Run\Domain\Repl\ReplCommandSystemIo; |
|
|
|
|
20
|
|
|
use Phel\Run\Domain\Runner\NamespaceCollector; |
|
|
|
|
21
|
|
|
use Phel\Run\Domain\Runner\NamespaceRunnerInterface; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @method RunConfig getConfig() |
25
|
|
|
*/ |
26
|
|
|
class RunFactory extends AbstractFactory |
27
|
|
|
{ |
28
|
2 |
|
public function createNamespaceRunner(): NamespaceRunnerInterface |
29
|
|
|
{ |
30
|
2 |
|
return new NamespaceRunner( |
31
|
2 |
|
$this->getCommandFacade(), |
32
|
2 |
|
$this->getBuildFacade(), |
33
|
2 |
|
); |
34
|
|
|
} |
35
|
|
|
|
36
|
3 |
|
public function getCommandFacade(): CommandFacadeInterface |
37
|
|
|
{ |
38
|
3 |
|
return $this->getProvidedDependency(RunProvider::FACADE_COMMAND); |
39
|
|
|
} |
40
|
|
|
|
41
|
3 |
|
public function getBuildFacade(): BuildFacadeInterface |
42
|
|
|
{ |
43
|
3 |
|
return $this->getProvidedDependency(RunProvider::FACADE_BUILD); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
public function getCompilerFacade(): CompilerFacadeInterface |
47
|
|
|
{ |
48
|
|
|
return $this->getProvidedDependency(RunProvider::FACADE_COMPILER); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
public function createNamespaceCollector(): NamespaceCollector |
52
|
|
|
{ |
53
|
|
|
return new NamespaceCollector( |
54
|
|
|
$this->getBuildFacade(), |
55
|
|
|
$this->getCommandFacade(), |
56
|
|
|
); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function createColorStyle(): ColorStyleInterface |
60
|
|
|
{ |
61
|
|
|
return ColorStyle::withStyles(); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
public function createPrinter(): PrinterInterface |
65
|
|
|
{ |
66
|
|
|
return Printer::readableWithColor(); |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
public function createReplCommandIo(): ReplCommandIoInterface |
70
|
|
|
{ |
71
|
|
|
return new ReplCommandSystemIo( |
72
|
|
|
$this->getConfig()->getPhelReplHistory(), |
73
|
|
|
$this->getCommandFacade(), |
74
|
|
|
$this->getApiFacade(), |
75
|
|
|
); |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
public function createNamespacesLoader(): NamespacesLoader |
79
|
|
|
{ |
80
|
|
|
return new NamespacesLoader( |
81
|
|
|
$this->getCommandFacade(), |
82
|
|
|
$this->getBuildFacade(), |
83
|
|
|
); |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
public function getApiFacade(): ApiFacadeInterface |
87
|
|
|
{ |
88
|
|
|
return $this->getProvidedDependency(RunProvider::FACADE_API); |
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