Merge pull request #25152 from nextcloud/backport/25138/stable20

[stable20] Fix comparison of PHP versions
This commit is contained in:
Roeland Jago Douma 2021-01-17 21:16:34 +01:00 committed by GitHub
commit 71f57e0b5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -2618,8 +2618,9 @@
</InvalidReturnType> </InvalidReturnType>
</file> </file>
<file src="apps/user_ldap/lib/Mapping/AbstractMapping.php"> <file src="apps/user_ldap/lib/Mapping/AbstractMapping.php">
<ImplicitToStringCast occurrences="1"> <ImplicitToStringCast occurrences="2">
<code>$qb-&gt;createNamedParameter($fdns, QueryBuilder::PARAM_STR_ARRAY)</code> <code>$qb-&gt;createNamedParameter($dnList, QueryBuilder::PARAM_STR_ARRAY)</code>
<code>$qb-&gt;createNamedParameter($fdnsSlice, QueryBuilder::PARAM_STR_ARRAY)</code>
</ImplicitToStringCast> </ImplicitToStringCast>
</file> </file>
<file src="apps/user_ldap/lib/Proxy.php"> <file src="apps/user_ldap/lib/Proxy.php">

View File

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