1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Add versions 5.4-7.3 as supported

This commit is contained in:
Nitamet 2023-08-18 20:32:05 +03:00
parent 5f40d26539
commit 2c7391a649

View File

@ -202,7 +202,7 @@ class ProjectAnalyzer
private const PHP_VERSION_REGEX = '^(0|[1-9]\d*)\.(0|[1-9]\d*)(?:\..*)?$';
private const PHP_SUPPORTED_VERSIONS_REGEX = '^(7\.4|8\.[012])(\..*)?$';
private const PHP_SUPPORTED_VERSIONS_REGEX = '^(5\.[456]|7\.[01234]|8\.[012])(\..*)?$';
/**
* @param array<ReportOptions> $generated_report_options
@ -1195,7 +1195,7 @@ class ProjectAnalyzer
if (!preg_match('/' . self::PHP_SUPPORTED_VERSIONS_REGEX . '/', $version)) {
fwrite(
STDERR,
'Psalm requires PHP version ">7.4". The specified version '
'Psalm supports PHP version ">=5.4". The specified version '
. $version
. " is either not supported or doesn't exist."
. PHP_EOL,