1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

allow Psalm to choose PHP8.1 if it's the lower PHP version allowed

This commit is contained in:
orklah 2021-10-14 16:54:27 +02:00
parent d54032078d
commit ef7e6cdf01

View File

@ -2234,7 +2234,7 @@ class Config
$constraint = $version_parser->parseConstraints($php_version);
foreach (['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] as $candidate) {
foreach (['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] as $candidate) {
if ($constraint->matches(new \Composer\Semver\Constraint\Constraint('<=', "$candidate.0.0-dev"))
|| $constraint->matches(new \Composer\Semver\Constraint\Constraint('<=', "$candidate.999"))
) {