From 92e2733896b2747c7041c320a36aa1a555cce0d3 Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Thu, 5 Dec 2013 20:33:42 -0500 Subject: [PATCH] Fix #310. Reduce the minimum PHP to 5.3.0 from 5.3.3. --- README.md | 5 ++--- composer.json | 2 +- drush.php | 2 +- examples/example.bashrc | 2 +- includes/bootstrap.inc | 4 ++-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index fa33d3a0a2..9c7463ea99 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ Each version of Drush supports multiple Drupal versions. Drush 6 is recommended Drush Version | Branch | PHP | Compatible Drupal versions | Code Status ------------- | ------ | --- | -------------------------- | ----------- -Drush 7 | [master](https://travis-ci.org/drush-ops/drush) | 5.3.3+ | D6, D7, D8 | -Drush 6 | [6.x](https://travis-ci.org/drush-ops/drush) | 5.3.3+ | D6, D7 | +Drush 7 | [master](https://travis-ci.org/drush-ops/drush) | 5.3.0+ | D6, D7, D8 | +Drush 6 | [6.x](https://travis-ci.org/drush-ops/drush) | 5.3.0+ | D6, D7 | Drush 5 | [5.x](https://travis-ci.org/drush-ops/drush) | 5.2.0+ | D6, D7 | Drush 4 | 4.x | 5.2.0+ | D5, D6, D7 | Unsupported Drush 3 | 3.x | 5.2.0+ | D5, D6 | Unsupported @@ -62,7 +62,6 @@ MISC REQUIREMENTS ----------- -* To use Drush, you'll need a command line PHP version 5.3.3+. * Drush commands that work with git require git 1.7 or greater. * Drush works best on a Unix-like OS (Linux, OS X) * Most Drush commands run on Windows. See INSTALLING DRUSH ON WINDOWS, below. diff --git a/composer.json b/composer.json index 7f62412607..d29c2165c0 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "drush.complete.sh" ], "require": { - "php": ">=5.3.3" + "php": ">=5.3.0" }, "require-dev": { "phpunit/phpunit": ">=3.5" diff --git a/drush.php b/drush.php index 91563bf0cc..db078685a3 100755 --- a/drush.php +++ b/drush.php @@ -5,7 +5,7 @@ * @file * drush is a PHP script implementing a command line shell for Drupal. * - * @requires PHP CLI 5.3.5, or newer. + * @requires PHP CLI 5.3.0, or newer. */ require(dirname(__FILE__) . '/includes/bootstrap.inc'); diff --git a/examples/example.bashrc b/examples/example.bashrc index 1ac6864a1f..71e5c2d304 100644 --- a/examples/example.bashrc +++ b/examples/example.bashrc @@ -275,7 +275,7 @@ function dssh() { } # Drush checks the current PHP version to ensure compatibility, and fails with -# an error if less than the supported minimum (currently 5.3.3). If you would +# an error if less than the supported minimum (currently 5.3.0). If you would # like to try to run Drush on a lower version of PHP, you can un-comment the # line below to skip this check. Note, however, that this is un-supported. diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 1e6ab4e8a7..d2662fde64 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1036,9 +1036,9 @@ function drush_bootstrap_prepare() { // PHP_VERSION, such as runserver/runserver.drush.inc, and also // adjust _drush_environment_check_php_ini() and the php_prohibited_options // list in the drush script. See http://drupal.org/node/1748228 - define('DRUSH_MINIMUM_PHP', '5.3.3'); + define('DRUSH_MINIMUM_PHP', '5.3.0'); if (version_compare(phpversion(), DRUSH_MINIMUM_PHP) < 0 && !getenv('DRUSH_NO_MIN_PHP')) { - return drush_set_error('DRUSH_REQUIREMENTS_ERROR', dt('Your command line PHP installation is too old. Drush requires at least PHP !version.', array('!version' => DRUSH_MINIMUM_PHP))); + return drush_set_error('DRUSH_REQUIREMENTS_ERROR', dt('Your command line PHP installation is too old. Drush requires at least PHP !version. To suppress this check, set the environment variable DRUSH_NO_MIN_PHP=1', array('!version' => DRUSH_MINIMUM_PHP))); } $drush_info = drush_read_drush_info();