Add check for php version

This commit is contained in:
Anton Medvedev 2017-05-16 17:26:00 +07:00
parent 6d9a0c24dd
commit ecdf5abe67

View File

@ -10,6 +10,15 @@
define('DEPLOYER', true);
define('DEPLOYER_BIN', __FILE__);
// Check for php7
if (!defined('PHP_MAJOR_VERSION') || PHP_MAJOR_VERSION < 7) {
die(
'Upgrade to php7' . PHP_EOL .
'Deployer 5.x supports only php7 and above.' . PHP_EOL .
'If you want to use older php version use Deployer 4.x' . PHP_EOL
);
}
// Detect deploy.php script
$options = getopt('f::', ['file::']);
$userSpecifiedFile = null;