From ecdf5abe67e44a8a0a3f6ac5f9d4e3fc5a37a004 Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Tue, 16 May 2017 17:26:00 +0700 Subject: [PATCH] Add check for php version --- bin/dep | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/dep b/bin/dep index 2f8e1f02..f72456dc 100755 --- a/bin/dep +++ b/bin/dep @@ -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;