|
29 | 29 | final class NeonAdapter implements Adapter |
30 | 30 | { |
31 | 31 |
|
32 | | - public const CACHE_KEY = 'v30-no-underscore'; |
| 32 | + public const CACHE_KEY = 'v31-expand-relative-paths'; |
33 | 33 |
|
34 | 34 | private const PREVENT_MERGING_SUFFIX = '!'; |
35 | 35 |
|
36 | 36 | /** @var FileHelper[] */ |
37 | 37 | private array $fileHelpers = []; |
38 | 38 |
|
| 39 | + /** |
| 40 | + * @param list<string> $expandRelativePaths |
| 41 | + */ |
| 42 | + public function __construct(private array $expandRelativePaths) |
| 43 | + { |
| 44 | + } |
| 45 | + |
39 | 46 | /** |
40 | 47 | * @return mixed[] |
41 | 48 | */ |
@@ -117,25 +124,7 @@ public function process(array $arr, string $fileKey, string $file): array |
117 | 124 | } |
118 | 125 | } |
119 | 126 |
|
120 | | - if (in_array($keyToResolve, [ |
121 | | - '[parameters][paths][]', |
122 | | - '[parameters][excludePaths][]', |
123 | | - '[parameters][excludePaths][analyse][]', |
124 | | - '[parameters][excludePaths][analyseAndScan][]', |
125 | | - '[parameters][ignoreErrors][][paths][]', |
126 | | - '[parameters][ignoreErrors][][path]', |
127 | | - '[parameters][bootstrapFiles][]', |
128 | | - '[parameters][scanFiles][]', |
129 | | - '[parameters][scanDirectories][]', |
130 | | - '[parameters][tmpDir]', |
131 | | - '[parameters][pro][tmpDir]', |
132 | | - '[parameters][memoryLimitFile]', |
133 | | - '[parameters][benchmarkFile]', |
134 | | - '[parameters][stubFiles][]', |
135 | | - '[parameters][symfony][consoleApplicationLoader]', |
136 | | - '[parameters][symfony][containerXmlPath]', |
137 | | - '[parameters][doctrine][objectManagerLoader]', |
138 | | - ], true) && is_string($val) && !str_contains($val, '%') && !str_starts_with($val, '*')) { |
| 127 | + if (in_array($keyToResolve, $this->expandRelativePaths, true) && is_string($val) && !str_contains($val, '%') && !str_starts_with($val, '*')) { |
139 | 128 | $fileHelper = $this->createFileHelperByFile($file); |
140 | 129 | $val = $fileHelper->normalizePath($fileHelper->absolutizePath($val)); |
141 | 130 | } |
|
0 commit comments