Merge pull request #25138 from gouttegd/fix25137

Fix comparison of PHP versions
This commit is contained in:
Joas Schilling 2021-01-15 15:18:25 +01:00 committed by GitHub
commit eafd281800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -113,12 +113,12 @@ class AppFetcher extends Fetcher {
$phpVersion = $versionParser->getVersion($release['rawPhpVersionSpec']);
$minPhpVersion = $phpVersion->getMinimumVersion();
$maxPhpVersion = $phpVersion->getMaximumVersion();
$minPhpFulfilled = $minPhpVersion === '' || $this->compareVersion->isCompatible(
$minPhpFulfilled = $minPhpVersion === '' || version_compare(
PHP_VERSION,
$minPhpVersion,
'>='
);
$maxPhpFulfilled = $maxPhpVersion === '' || $this->compareVersion->isCompatible(
$maxPhpFulfilled = $maxPhpVersion === '' || version_compare(
PHP_VERSION,
$maxPhpVersion,
'<='