Last modified: 2013-03-18 10:03:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30054, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28054 - Fixup phpversion() calls where they specify an old version
Fixup phpversion() calls where they specify an old version
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.18.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-15 12:08 UTC by Sam Reed (reedy)
Modified: 2013-03-18 10:03 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2011-03-15 12:08:35 UTC
As of r83879 we require at least 5.2.3. I've started fixing up code paths where it checks and conditionally does stuff for some old versions of PHP.

Most of these can be removed/updated
Comment 1 Sam Reed (reedy) 2011-03-15 12:32:02 UTC
Mmmm. Have I done most of these now...
Comment 3 Sam Reed (reedy) 2011-03-16 22:04:05 UTC
Cheers :)

AFAIK all the usages of phpversion() can stay, just need to check the PHP_VERSION stuff now
Comment 4 Quim Gil 2013-03-18 05:53:18 UTC
Was this task completed? 1.18 is not supported anymore.

(In reply to comment #0)
> As of r83879 we require at least 5.2.3. 

According to http://www.mediawiki.org/wiki/Manual:Installation_requirements now it's 5.3.2 or later.
Comment 5 Andre Klapper 2013-03-18 10:03:24 UTC
Full list looks like completed so closing. Only one I'm wondering about is ./includes/installer/Installer.php:	$this->showError( 'config-using531', phpversion() ); but that's because the exact PHP version is not known.

$:andre\> grep -r PHP_VERSION .
Binary file ./.git/objects/pack/pack-805102c3dd67f75022fbf76a17f81b1d33a68868.pack matches
./includes/json/FormatJson.php:		if ( !function_exists( 'json_encode' ) || ( $pretty && version_compare( PHP_VERSION, '5.4.0', '<' ) ) ) {
./includes/debug/Debug.php:			'phpVersion' => PHP_VERSION,
./includes/installer/Installer.php:	const MINIMUM_PHP_VERSION = '5.3.2';
./includes/installer/Installer.php:		if( version_compare( $phpVersion, self::MINIMUM_PHP_VERSION, '>=' ) ) {
./includes/installer/Installer.php:			$this->showMessage( 'config-env-php-toolow', $phpVersion, self::MINIMUM_PHP_VERSION );
./includes/CryptRand.php:				&& ( !wfIsWindows() || version_compare( PHP_VERSION, '5.3.4', '>=' ) )
./includes/GlobalFunctions.php:	if ( $limit && version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
./includes/GlobalFunctions.php:	$php_ver = PHP_VERSION;
./includes/GlobalFunctions.php:			( wfIsWindows() && version_compare( PHP_VERSION, '5.3.3', '>=' ) )
./maintenance/dev/includes/php.sh:		if "$binary" -r 'exit((int)!version_compare(PHP_VERSION, "5.4", ">="));'; then
./maintenance/Maintenance.php:if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) {
./maintenance/checkSyntax.php:		$useParseKit = function_exists( 'parsekit_compile_file' ) && version_compare( PHP_VERSION, '5.3', '<' );
$:andre\> grep -r phpversion .
./index.php:if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
./api.php:if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
./resources/mediawiki/mediawiki.debug.js:			bitDiv( 'phpversion' )
./includes/specials/SpecialVersion.php:		$software['[http://www.php.net/ PHP]'] = phpversion() . " (" . PHP_SAPI . ")";
./includes/PHPVersionError.php:	$phpVersion = phpversion();
./includes/api/ApiQuerySiteinfo.php:		$data['phpversion'] = phpversion();
./includes/installer/Installer.php:		$phpVersion = phpversion();
./includes/installer/Installer.php:			$this->showError( 'config-using531', phpversion() );
./maintenance/install.php:if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '5.3.2' ) < 0 ) ) {
./maintenance/update.php:if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '5.3.2' ) < 0 ) ) {
./maintenance/update.php:			$ver = phpversion();
./load.php:if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
./tests/testHelpers.inc:				'tr_php_version' => phpversion(),
$:andre\>

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links