Strings like "5.6.99-hhvm" are not version numbers but merely
a way for HHVM to pass version checks. They should not be
displayed in the UI.
This affects Special:Version, the API (action=query&meta=siteinfo),
the installer welcome page, and the debug toolbar.
Follows-up
d09ab9001ffe.
Change-Id: Ia99dca64779e9c4eaddf5f0e0101674d029b8d55
$data['phpversion'] = PHP_VERSION;
$data['phpsapi'] = PHP_SAPI;
+ if ( defined( 'HHVM_VERSION' ) ) {
+ $data['hhvmversion'] = HHVM_VERSION;
+ }
$data['dbtype'] = $config->get( 'DBtype' );
$data['dbversion'] = $this->getDB()->getServerVersion();
return array(
'mwVersion' => $wgVersion,
- 'phpVersion' => PHP_VERSION,
+ 'phpEngine' => wfIsHHVM() ? 'HHVM' : 'PHP',
+ 'phpVersion' => wfIsHHVM() ? HHVM_VERSION : PHP_VERSION,
'gitRevision' => GitInfo::headSHA1(),
'gitBranch' => GitInfo::currentBranch(),
'gitViewUrl' => GitInfo::headViewUrl(),
public function doEnvironmentChecks() {
// Php version has already been checked by entry scripts
// Show message here for information purposes
- $this->showMessage( 'config-env-php', PHP_VERSION );
+ if ( wfIsHHVM() ) {
+ $this->showMessage( 'config-env-hhvm', HHVM_VERSION );
+ } else {
+ $this->showMessage( 'config-env-php', PHP_VERSION );
+ }
$good = true;
// Must go here because an old version of PCRE can prevent other checks from completing
"config-env-good": "The environment has been checked.\nYou can install MediaWiki.",
"config-env-bad": "The environment has been checked.\nYou cannot install MediaWiki.",
"config-env-php": "PHP $1 is installed.",
+ "config-env-hhvm": "HHVM $1 is installed.",
"config-unicode-using-utf8": "Using Brion Vibber's utf8_normalize.so for Unicode normalization.",
"config-unicode-using-intl": "Using the [http://pecl.php.net/intl intl PECL extension] for Unicode normalization.",
"config-unicode-pure-php-warning": "<strong>Warning:</strong> The [http://pecl.php.net/intl intl PECL extension] is not available to handle Unicode normalization, falling back to slow pure-PHP implementation.\nIf you run a high-traffic site, you should read a little on [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations Unicode normalization].",
"config-env-good": "See also:\n* {{msg-mw|Config-env-bad}}",
"config-env-bad": "See also:\n* {{msg-mw|Config-env-good}}",
"config-env-php": "Parameters:\n* $1 - the version of PHP that has been installed\nSee also:\n* {{msg-mw|config-env-php-toolow}}",
+ "config-env-hhvm": "Parameters:\n* $1 - the version of HHVM that has been installed",
"config-unicode-using-utf8": "Status message in the MediaWiki installer environment checks.",
"config-unicode-using-intl": "Status message in the MediaWiki installer environment checks.",
"config-unicode-pure-php-warning": "PECL is the name of a group producing standard pieces of software for PHP, and intl is the name of their library handling some aspects of internationalization.",
// wikimarkup can be used.
$software = array();
$software['[https://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked();
- $phpKey = wfIsHHVM() ? '[http://hhvm.com/ HHVM]' :
- '[https://php.net/ PHP]';
- $software[$phpKey] = PHP_VERSION . " (" . PHP_SAPI . ")";
+ if ( wfIsHHVM() ) {
+ $software['[http://hhvm.com/ HHVM]'] = HHVM_VERSION . " (" . PHP_SAPI . ")";
+ } else {
+ $software['[https://php.net/ PHP]'] = PHP_VERSION . " (" . PHP_SAPI . ")";
+ }
$software[$dbr->getSoftwareLink()] = $dbr->getServerInfo();
// Allow a hook to add/remove items.
}
bitDiv( 'phpversion' )
- .append( $( '<a href="//www.php.net/"></a>' ).text( 'PHP' ) )
+ .append( $( this.data.phpEngine === 'HHVM'
+ ? '<a href="http://hhvm.com/">HHVM</a>'
+ : '<a href="https://php.net/">PHP</a>'
+ ) )
.append( ': ' + this.data.phpVersion );
bitDiv( 'time' )
$this->assertInstanceOf( 'ApiResult', $result );
$data = $result->getData();
- $expectedKeys = array( 'mwVersion', 'phpVersion', 'gitRevision', 'gitBranch',
+ $expectedKeys = array( 'mwVersion', 'phpEngine', 'phpVersion', 'gitRevision', 'gitBranch',
'gitViewUrl', 'time', 'log', 'debugLog', 'queries', 'request', 'memory',
'memoryPeak', 'includes', 'profile', '_element' );