From 0e17070d4028fa6c2ead49ea01a264ddde40dfc1 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 23 Oct 2014 18:21:50 -0700 Subject: [PATCH] Require PHP >= 5.3.3 Bug: T839 Change-Id: Iac827ef8505ff0653a40e45d759b0f79619351ee --- INSTALL | 2 +- RELEASE-NOTES-1.25 | 2 +- api.php | 2 +- composer.json | 2 +- includes/GlobalFunctions.php | 2 +- includes/PHPVersionError.php | 2 +- includes/debug/logger/legacy/Logger.php | 2 +- index.php | 2 +- load.php | 2 +- maintenance/Maintenance.php | 4 ++-- maintenance/update.php | 2 +- mw-config/index.php | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/INSTALL b/INSTALL index e8731a1ecc..70d8d53071 100644 --- a/INSTALL +++ b/INSTALL @@ -6,7 +6,7 @@ Starting with MediaWiki 1.2.0, it's possible to install and configure the wiki "in-place", as long as you have the necessary prerequisites available. Required software: -* Web server with PHP 5.3.2 or higher. +* Web server with PHP 5.3.3 or higher. * A SQL server, the following types are supported ** MySQL 5.0.2 or higher ** PostgreSQL 8.3 or higher diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index f67a9e90b1..b0014d8060 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -149,7 +149,7 @@ changes to languages because of Bugzilla reports. == Compatibility == -MediaWiki 1.25 requires PHP 5.3.2 or later. There is experimental support for +MediaWiki 1.25 requires PHP 5.3.3 or later. There is experimental support for HHVM 3.3.0. MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but diff --git a/api.php b/api.php index 7974f15cb2..74ee775bbe 100644 --- a/api.php +++ b/api.php @@ -34,7 +34,7 @@ define( 'MW_API', true ); // Bail if PHP is too low -if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) { +if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.3' ) < 0 ) { // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ require dirname( __FILE__ ) . '/includes/PHPVersionError.php'; wfPHPVersionError( 'api.php' ); diff --git a/composer.json b/composer.json index 3b18933e9f..851ad412a1 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "wiki": "https://www.mediawiki.org/" }, "require": { - "php": ">=5.3.2", + "php": ">=5.3.3", "psr/log": "1.0.0" }, "require-dev": { diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index cc7086c943..e5d49b47ad 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -30,7 +30,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { /** * Compatibility functions * - * We support PHP 5.3.2 and up. + * We support PHP 5.3.3 and up. * Re-implementations of newer functions or functions in non-standard * PHP extensions may be included here. */ diff --git a/includes/PHPVersionError.php b/includes/PHPVersionError.php index 5af818fd64..b061990e0f 100644 --- a/includes/PHPVersionError.php +++ b/includes/PHPVersionError.php @@ -40,7 +40,7 @@ */ function wfPHPVersionError( $type ) { $mwVersion = '1.25'; - $minimumVersionPHP = '5.3.2'; + $minimumVersionPHP = '5.3.3'; $phpVersion = PHP_VERSION; $protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0'; diff --git a/includes/debug/logger/legacy/Logger.php b/includes/debug/logger/legacy/Logger.php index ff6336bd00..cb32da9cf3 100644 --- a/includes/debug/logger/legacy/Logger.php +++ b/includes/debug/logger/legacy/Logger.php @@ -191,7 +191,7 @@ class MWLoggerLegacyLogger extends \Psr\Log\AbstractLogger { } // Workaround for https://bugs.php.net/bug.php?id=52063 - // Can be removed when min PHP > 5.3.2 + // Can be removed when min PHP > 5.3.6 if ( $cachedTimezone === null ) { $d = date_create( 'now' ); } else { diff --git a/index.php b/index.php index b35967b325..c32bd3aba2 100644 --- a/index.php +++ b/index.php @@ -34,7 +34,7 @@ # has structures (try/catch, foo()->bar(), etc etc) which throw parse errors in # PHP 4. Setup.php and ObjectCache.php have structures invalid in PHP 5.0 and # 5.1, respectively. -if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) { +if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.3' ) < 0 ) { // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ require dirname( __FILE__ ) . '/includes/PHPVersionError.php'; wfPHPVersionError( 'index.php' ); diff --git a/load.php b/load.php index 655f3092a5..fc6cf98a58 100644 --- a/load.php +++ b/load.php @@ -23,7 +23,7 @@ */ // Bail if PHP is too low -if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) { +if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.3' ) < 0 ) { // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ require dirname( __FILE__ ) . '/includes/PHPVersionError.php'; wfPHPVersionError( 'load.php' ); diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 8d30df4c61..d740f56bbf 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -20,8 +20,8 @@ * @defgroup Maintenance Maintenance */ -// Make sure we're on PHP5.3.2 or better -if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) { +// Make sure we're on PHP5.3.3 or better +if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.3' ) < 0 ) { // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ require_once dirname( __FILE__ ) . '/../includes/PHPVersionError.php'; wfPHPVersionError( 'cli' ); diff --git a/maintenance/update.php b/maintenance/update.php index 046d73cdce..657a2fcdce 100755 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -26,7 +26,7 @@ * @ingroup Maintenance */ -if ( !function_exists( 'version_compare' ) || ( version_compare( PHP_VERSION, '5.3.2' ) < 0 ) ) { +if ( !function_exists( 'version_compare' ) || ( version_compare( PHP_VERSION, '5.3.3' ) < 0 ) ) { require dirname( __FILE__ ) . '/../includes/PHPVersionError.php'; wfPHPVersionError( 'cli' ); } diff --git a/mw-config/index.php b/mw-config/index.php index a6cebc3951..ed3e7f4796 100644 --- a/mw-config/index.php +++ b/mw-config/index.php @@ -21,7 +21,7 @@ */ // Bail if PHP is too low -if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) { +if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.3' ) < 0 ) { // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ require dirname( dirname( __FILE__ ) ) . '/includes/PHPVersionError.php'; wfPHPVersionError( 'mw-config/index.php' ); -- 2.20.1