Skip to content

Commit

Permalink
[VersionBonding] Correctly shows missed rectors that will not run (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Aug 2, 2021
1 parent e3ce320 commit e5b00c4
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,20 @@ private function reportMissedRectors(array $minPhpVersions): void
}

/**
* @param MinPhpVersionInterface[] $minPhpVersions
* @param MinPhpVersionInterface[] $missedRectors
*/
private function reportWarningMessage(int $minProjectPhpVersion, array $minPhpVersions): void
private function reportWarningMessage(int $minProjectPhpVersion, array $missedRectors): void
{
$phpVersion = new PhpVersion($minProjectPhpVersion);

$warningMessage = sprintf(
'Your project requires min PHP version "%s".%s%d%sSome Rectors rules defined in your configuration require higher PHP version and will not run,%sto avoid breaking your codebase.',
'Your project requires min PHP version "%s". %s%d Rector rules defined in your configuration require higher PHP version and will not run,%sto avoid breaking your codebase, use -vvv for detailed info.',
$phpVersion->getVersionString(),
count($minPhpVersions),
PHP_EOL,
PHP_EOL . PHP_EOL,
count($missedRectors),
PHP_EOL
);

$this->symfonyStyle->warning($warningMessage);
}
}

0 comments on commit e5b00c4

Please sign in to comment.