*/
abstract class Installer {
+ // This is the absolute minimum PHP version we can support
+ const MINIMUM_PHP_VERSION = '5.2.0';
+
/**
* @var array
*/
* @return Status
*/
public function doEnvironmentChecks() {
- $this->showMessage( 'config-env-php', phpversion() );
-
- $good = true;
+ $phpVersion = phpversion();
+ if( version_compare( $phpVersion, self::MINIMUM_PHP_VERSION, '>=' ) ) {
+ $this->showMessage( 'config-env-php', $phpVersion );
+ $good = true;
+ } else {
+ $this->showMessage( 'config-env-php-toolow', $phpVersion, self::MINIMUM_PHP_VERSION );
+ $good = false;
+ }
- foreach ( $this->envChecks as $check ) {
- $status = $this->$check();
- if ( $status === false ) {
- $good = false;
+ if( $good ) {
+ foreach ( $this->envChecks as $check ) {
+ $status = $this->$check();
+ if ( $status === false ) {
+ $good = false;
+ }
}
}