|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace hanneskod\readmetester\Config; |
|
6
|
|
|
|
|
7
|
|
|
use hanneskod\readmetester\InputLanguage; |
|
8
|
|
|
use hanneskod\readmetester\Output; |
|
9
|
|
|
use hanneskod\readmetester\Runner; |
|
10
|
|
|
|
|
11
|
|
|
/** |
|
12
|
|
|
* Configuration id constants and helper functions |
|
13
|
|
|
*/ |
|
14
|
|
|
final class Configs |
|
15
|
|
|
{ |
|
16
|
|
|
public const DEFAULT_SUITE_NAME = 'default'; |
|
17
|
|
|
|
|
18
|
|
|
public const SUITES = 'suites'; |
|
19
|
|
|
public const DEFAULTS = 'defaults'; |
|
20
|
|
|
public const CLI = '__CLI__'; |
|
21
|
|
|
|
|
22
|
|
|
public const ACTIVE = 'active'; |
|
23
|
|
|
public const INCLUDE_PATHS = 'include_paths'; |
|
24
|
|
|
public const EXCLUDE_PATHS = 'exclude_paths'; |
|
25
|
|
|
public const FILE_EXTENSIONS = 'file_extensions'; |
|
26
|
|
|
public const STOP_ON_FAILURE = 'stop_on_failure'; |
|
27
|
|
|
public const FILTER = 'filter'; |
|
28
|
|
|
public const STDIN = 'stdin'; |
|
29
|
|
|
public const GLOBAL_ATTRIBUTES = 'global_attributes'; |
|
30
|
|
|
|
|
31
|
|
|
public const BOOTSTRAP = 'bootstrap'; |
|
32
|
|
|
public const SUBSCRIBERS = 'subscribers'; |
|
33
|
|
|
|
|
34
|
|
|
public const INPUT_LANGUAGE = 'input_language'; |
|
35
|
|
|
public const INPUT_ID_MARKDOWN = 'markdown'; |
|
36
|
|
|
public const INPUT_ID = [ |
|
37
|
|
|
self::INPUT_ID_MARKDOWN => InputLanguage\Markdown\MarkdownCompilerFactory::class, |
|
38
|
|
|
]; |
|
39
|
|
|
|
|
40
|
|
|
public const OUTPUT = 'output_format'; |
|
41
|
|
|
public const OUTPUT_ID_DEBUG = 'debug'; |
|
42
|
|
|
public const OUTPUT_ID_DEFAULT = 'default'; |
|
43
|
|
|
public const OUTPUT_ID_JSON = 'json'; |
|
44
|
|
|
public const OUTPUT_ID = [ |
|
45
|
|
|
self::OUTPUT_ID_DEBUG => Output\DebugOutputtingSubscriber::class, |
|
|
|
|
|
|
46
|
|
|
self::OUTPUT_ID_DEFAULT => Output\DefaultOutputtingSubscriber::class, |
|
47
|
|
|
self::OUTPUT_ID_JSON => Output\JsonOutputtingSubscriber::class, |
|
48
|
|
|
]; |
|
49
|
|
|
|
|
50
|
|
|
public const RUNNER = 'runner'; |
|
51
|
|
|
public const RUNNER_ID_EVAL = 'eval'; |
|
52
|
|
|
public const RUNNER_ID_PARALLEL = 'parallel'; |
|
53
|
|
|
public const RUNNER_ID_PROCESS = 'process'; |
|
54
|
|
|
public const RUNNER_ID = [ |
|
55
|
|
|
self::RUNNER_ID_EVAL => Runner\EvalRunner::class, |
|
56
|
|
|
self::RUNNER_ID_PARALLEL => Runner\ParallelRunner::class, |
|
57
|
|
|
self::RUNNER_ID_PROCESS => Runner\ProcessRunner::class, |
|
58
|
|
|
]; |
|
59
|
|
|
|
|
60
|
|
|
/** @param array<string, string> $map */ |
|
61
|
|
|
public static function expand(array $map, string $key): string |
|
62
|
|
|
{ |
|
63
|
|
|
if (isset($map[$key])) { |
|
64
|
|
|
return $map[$key]; |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
return $key; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
/** @param array<string, string> $map */ |
|
71
|
|
|
public static function describe(array $map): string |
|
72
|
|
|
{ |
|
73
|
|
|
return implode(', ', array_keys($map)); |
|
74
|
|
|
} |
|
75
|
|
|
} |
|
76
|
|
|
|
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