From 34e319260dbd8bea151a3e6ff6d1706729477ca2 Mon Sep 17 00:00:00 2001 From: m8rge Date: Mon, 19 Dec 2016 10:45:01 +0500 Subject: [PATCH] check php version --- box.json | 2 +- stub.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 stub.php diff --git a/box.json b/box.json index db9806a..d1da9e5 100644 --- a/box.json +++ b/box.json @@ -16,7 +16,7 @@ "git-version": "version", "main": "index.php", "output": "swagger2slate.phar", - "stub": true, + "stub": "stub.php", "compression": "GZ", "compactors": "Herrera\\Box\\Compactor\\Php" } \ No newline at end of file diff --git a/stub.php b/stub.php new file mode 100644 index 0000000..f8ecd6d --- /dev/null +++ b/stub.php @@ -0,0 +1,12 @@ +#!/usr/bin/env php +=')) { + die("Php minimum version is 5.5\n"); +} + +if (class_exists('Phar')) { + Phar::mapPhar('default.phar'); + require 'phar://' . __FILE__ . '/index.php'; +} +__HALT_COMPILER(); ?>