Add 1.31.3/1.32.3 to HISTORY
[lhc/web/wiklou.git] / includes / PHPVersionCheck.php
index cbe63a3..b63a84d 100644 (file)
@@ -20,6 +20,7 @@
 
 // phpcs:disable Generic.Arrays.DisallowLongArraySyntax,PSR2.Classes.PropertyDeclaration,MediaWiki.Usage.DirUsage
 // phpcs:disable Squiz.Scope.MemberVarScope.Missing,Squiz.Scope.MethodScope.Missing
+// @phan-file-suppress PhanPluginDuplicateConditionalNullCoalescing
 /**
  * Check PHP Version, as well as for composer dependencies in entry points,
  * and display something vaguely comprehensible in the event of a totally
@@ -35,7 +36,7 @@
  */
 class PHPVersionCheck {
        /* @var string The number of the MediaWiki version used. */
-       var $mwVersion = '1.33';
+       var $mwVersion = '1.34';
 
        /* @var array A mapping of PHP functions to PHP extensions. */
        var $functionsExtensionsMapping = array(
@@ -111,7 +112,7 @@ class PHPVersionCheck {
                        'vendor' => 'the PHP Group',
                        'upstreamSupported' => '5.6.0',
                        'minSupported' => '7.0.13',
-                       'upgradeURL' => 'https://secure.php.net/downloads.php',
+                       'upgradeURL' => 'https://www.php.net/downloads.php',
                );
        }
 
@@ -122,10 +123,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']} "
@@ -205,7 +203,7 @@ HTML;
 
                        $missingExtText = '';
                        $missingExtHtml = '';
-                       $baseUrl = 'https://secure.php.net';
+                       $baseUrl = 'https://www.php.net';
                        foreach ( $missingExtensions as $ext ) {
                                $missingExtText .= " * $ext <$baseUrl/$ext>\n";
                                $missingExtHtml .= "<li><b>$ext</b> "