X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FPHPVersionCheck.php;h=8d642e1785f71e1de1fa1b639c56602dd19be488;hb=af80076034fb734d652eb043c523c1d8df974e51;hp=2d9216dfaa0a2f2f8087559aaf0faa7c49be38d0;hpb=7621b57d958d0753236221227cbfb519d7faf192;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/PHPVersionCheck.php b/includes/PHPVersionCheck.php index 2d9216dfaa..8d642e1785 100644 --- a/includes/PHPVersionCheck.php +++ b/includes/PHPVersionCheck.php @@ -31,8 +31,6 @@ * * @note This class uses setter methods instead of a constructor so that * it can be compatible with PHP 4, PHP 5 and PHP 7 (without warnings). - * - * @class */ class PHPVersionCheck { /* @var string The number of the MediaWiki version used. */ @@ -79,8 +77,8 @@ class PHPVersionCheck { /** * Return the version of the installed PHP implementation. * - * @param string $impl By default, the function returns the info of the currently installed PHP - * implementation. Using this parameter the caller can decide, what version info will be + * @param string|false $impl By default, the function returns the info of the currently installed + * PHP implementation. Using this parameter the caller can decide, what version info will be * returned. Valid values: HHVM, PHP * @return array An array of information about the PHP implementation, containing: * - 'version': The version of the PHP implementation (specific to the implementation, not @@ -110,8 +108,8 @@ class PHPVersionCheck { 'implementation' => 'PHP', 'version' => PHP_VERSION, 'vendor' => 'the PHP Group', - 'upstreamSupported' => '5.6.0', - 'minSupported' => '7.0.13', + 'upstreamSupported' => '7.1.0', + 'minSupported' => '7.2.0', 'upgradeURL' => 'https://www.php.net/downloads.php', ); } @@ -123,10 +121,7 @@ class PHPVersionCheck { $phpInfo = $this->getPHPInfo(); $minimumVersion = $phpInfo['minSupported']; $otherInfo = $this->getPHPInfo( $phpInfo['implementation'] === 'HHVM' ? 'PHP' : 'HHVM' ); - if ( - !function_exists( 'version_compare' ) - || version_compare( $phpInfo['version'], $minimumVersion ) < 0 - ) { + if ( version_compare( $phpInfo['version'], $minimumVersion ) < 0 ) { $shortText = "MediaWiki $this->mwVersion requires at least {$phpInfo['implementation']}" . " version $minimumVersion or {$otherInfo['implementation']} version " . "{$otherInfo['minSupported']}, you are using {$phpInfo['implementation']} " @@ -263,7 +258,7 @@ HTML; MediaWiki {$this->mwVersion} - - The MediaWiki logo + The MediaWiki logo

MediaWiki {$this->mwVersion} internal error

-
+

{$shortHtml}