From 7e2679ffc1034c480b4c22a886709d27b859d410 Mon Sep 17 00:00:00 2001 From: Guilliam Xavier Date: Thu, 13 Feb 2020 14:37:08 +0100 Subject: [PATCH] ValidateCommand: pass $isStrict to outputResult() of with-dependencies too --- src/Composer/Command/ValidateCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Composer/Command/ValidateCommand.php b/src/Composer/Command/ValidateCommand.php index 7ec15ccb9..12b9f9fb8 100644 --- a/src/Composer/Command/ValidateCommand.php +++ b/src/Composer/Command/ValidateCommand.php @@ -108,8 +108,9 @@ EOT $file = $path . '/composer.json'; if (is_dir($path) && file_exists($file)) { list($errors, $publishErrors, $warnings) = $validator->validate($file, $checkAll); - $this->outputResult($io, $package->getPrettyName(), $errors, $warnings, $checkPublish, $publishErrors); + $this->outputResult($io, $package->getPrettyName(), $errors, $warnings, $checkPublish, $publishErrors, false, array(), false, $isStrict); + // $errors include publish errors when exists $depCode = $errors ? 2 : ($isStrict && $warnings ? 1 : 0); $exitCode = max($depCode, $exitCode); }