r83217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83216‎ | r83217 | r83218 >
Date:13:58, 4 March 2011
Author:demon
Status:ok
Tags:
Comment:
(bug 27781) Pt 2: Check for minimum PHP version in installer (which is seperate from the PHP4 check)
Modified paths:
  • /trunk/phase3/INSTALL (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/INSTALL
@@ -6,10 +6,10 @@
77 "in-place", as long as you have the necessary prerequisites available.
88
99 Required software:
10 -* Web server with PHP 5.1.x or higher.
 10+* Web server with PHP 5.2.x or higher.
1111 * A SQL server, the following types are supported
1212 ** MySQL 4.0.14 or higher
13 -** PostgreSQL 8.1 or higher
 13+** PostgreSQL 8.3 or higher
1414 ** SQLite
1515
1616 MediaWiki is developed and tested mainly on Unix/Linux platforms, but should
Index: trunk/phase3/includes/installer/Installer.php
@@ -23,6 +23,9 @@
2424 */
2525 abstract class Installer {
2626
 27+ // This is the absolute minimum PHP version we can support
 28+ const MINIMUM_PHP_VERSION = '5.2.0';
 29+
2730 /**
2831 * @var array
2932 */
@@ -363,14 +366,21 @@
364367 * @return Status
365368 */
366369 public function doEnvironmentChecks() {
367 - $this->showMessage( 'config-env-php', phpversion() );
 370+ $phpVersion = phpversion();
 371+ if( version_compare( $phpVersion, self::MINIMUM_PHP_VERSION, '>=' ) ) {
 372+ $this->showMessage( 'config-env-php', $phpVersion );
 373+ $good = true;
 374+ } else {
 375+ $this->showMessage( 'config-env-php-toolow', $phpVersion, self::MINIMUM_PHP_VERSION );
 376+ $good = false;
 377+ }
368378
369 - $good = true;
370 -
371 - foreach ( $this->envChecks as $check ) {
372 - $status = $this->$check();
373 - if ( $status === false ) {
374 - $good = false;
 379+ if( $good ) {
 380+ foreach ( $this->envChecks as $check ) {
 381+ $status = $this->$check();
 382+ if ( $status === false ) {
 383+ $good = false;
 384+ }
375385 }
376386 }
377387
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -89,6 +89,8 @@
9090 'config-env-bad' => 'The environment has been checked.
9191 You cannot install MediaWiki.',
9292 'config-env-php' => 'PHP $1 is installed.',
 93+ 'config-env-php-toolow' => 'PHP $1 is installed.
 94+However, MediaWiki requires PHP $2 or higher.',
9395 'config-unicode-using-utf8' => 'Using Brion Vibber\'s utf8_normalize.so for Unicode normalization.',
9496 'config-unicode-using-intl' => 'Using the [http://pecl.php.net/intl intl PECL extension] for Unicode normalization.',
9597 'config-unicode-pure-php-warning' => "'''Warning''': The [http://pecl.php.net/intl intl PECL extension] is not available to handle Unicode normalization, falling back to slow pure-PHP implementation.
Index: trunk/phase3/RELEASE-NOTES
@@ -18,6 +18,10 @@
1919 Those wishing to use the latest code instead of a branch release can obtain
2020 it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
2121
 22+=== PHP 5.2 now required ==
 23+In 1.18, the lowest supported version of MediaWiki is now 5.2.x. Please upgrade
 24+PHP if you have not done so prior to upgrading MediaWiki.
 25+
2226 === Configuration changes in 1.18 ===
2327 * The WantedPages::getSQL hook has been removed and replaced with
2428 WantedPages::getQueryInfo . This may break older extensions.

Sign-offs

UserFlagDate
Hasharinspected17:27, 4 March 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r83879Require at least PHP 5.2.3. There's not much point increasing the minimum to ...tstarling10:42, 14 March 2011
r87253Followup r84169, r83217: require 5.2.3 in REL1_17 also. 5.1.x is broken by a ...demon16:36, 2 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83216(bug 27781) Installer does not warn about 5.1.x. People have been using array...demon13:57, 4 March 2011

Status & tagging log