Skip to content

Commit

Permalink
Put in a php version check (but not quite working yet, as it uses dt …
Browse files Browse the repository at this point in the history
…too early).
  • Loading branch information
greg-1-anderson committed Jul 28, 2017
1 parent df84a56 commit e2c8a49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Preflight/Preflight.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ protected function findCommandFileSearchPath($preflightArgs)
*/
protected function confirmPhpVersion($minimumPhpVersion)
{
// @TODO
if (version_compare(phpversion(), $minimumPhpVersion) < 0 && !getenv('DRUSH_NO_MIN_PHP')) {
throw new \Exception(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', ['!version' => $minimumPhpVersion]));
}
}

/**
Expand Down

0 comments on commit e2c8a49

Please sign in to comment.