Skip to content

Commit 9f841bd

Browse files
author
akos
committed
pass parameters according to composer version
1 parent d27d1ca commit 9f841bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Domain/Insights/Composer/ComposerMustBeValid.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ private function process(): void
4848
{
4949
$validator = new ConfigValidator(new NullIO());
5050

51-
[$errors, $publishErrors, $warnings] = $validator->validate(ComposerFinder::getPath($this->collector), ValidatingArrayLoader::CHECK_ALL, $this->config['composerVersionCheck'] ?? ConfigValidator::CHECK_VERSION);
51+
if($this->isComposerV2()){
52+
[$errors, $publishErrors, $warnings] = $validator->validate(ComposerFinder::getPath($this->collector), ValidatingArrayLoader::CHECK_ALL, $this->config['composerVersionCheck'] ?? ConfigValidator::CHECK_VERSION);
53+
}else{
54+
[$errors, $publishErrors, $warnings] = $validator->validate(ComposerFinder::getPath($this->collector), ValidatingArrayLoader::CHECK_ALL);
55+
}
5256

5357
foreach (array_merge($errors, $publishErrors, $warnings) as $issue) {
5458
if (strpos($issue, ' : ') !== false) {

0 commit comments

Comments
 (0)