Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,17 @@ parameters:
tmpDir: %sysGetTempDir%/phpstan-fixer
__validate: true
parametersNotInvalidatingCache:
- parameters.editorUrl
- parameters.editorUrlTitle
- parameters.errorFormat
- parameters.ignoreErrors
- parameters.reportUnmatchedIgnoredErrors
- parameters.tipsOfTheDay
- parameters.parallel
- parameters.internalErrorsCountLimit
- parameters.cache
- parameters.memoryLimitFile
- parameters.pro
- [parameters, editorUrl]
- [parameters, editorUrlTitle]
- [parameters, errorFormat]
- [parameters, ignoreErrors]
- [parameters, reportUnmatchedIgnoredErrors]
- [parameters, tipsOfTheDay]
- [parameters, parallel]
- [parameters, internalErrorsCountLimit]
- [parameters, cache]
- [parameters, memoryLimitFile]
- [parameters, pro]
- parametersSchema

extensions:
Expand Down
5 changes: 4 additions & 1 deletion conf/parametersSchema.neon
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ parametersSchema:
])
env: arrayOf(string(), anyOf(int(), string()))
sysGetTempDir: string()
parametersNotInvalidatingCache: listOf(string())
parametersNotInvalidatingCache: listOf(schema(anyOf(
string(),
listOf(string()),
)))

# playground mode
sourceLocatorPlaygroundMode: bool()
Expand Down
5 changes: 3 additions & 2 deletions src/Analyser/ResultCache/ResultCacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ final class ResultCacheManager
* @param string[] $bootstrapFiles
* @param string[] $scanFiles
* @param string[] $scanDirectories
* @param list<string> $parametersNotInvalidatingCache
* @param list<string|non-empty-list<string>> $parametersNotInvalidatingCache
*/
public function __construct(
private Container $container,
Expand Down Expand Up @@ -886,7 +886,8 @@ private function getMeta(array $allAnalysedFiles, ?array $projectConfigArray): a

if ($projectConfigArray !== null) {
foreach ($this->parametersNotInvalidatingCache as $parameterPath) {
ArrayHelper::unsetKeyAtPath($projectConfigArray, explode('.', $parameterPath));
$pathAsArray = is_array($parameterPath) ? $parameterPath : explode('.', $parameterPath);
ArrayHelper::unsetKeyAtPath($projectConfigArray, $pathAsArray);
}

ksort($projectConfigArray);
Expand Down
Loading