Skip to content

Commit

Permalink
check php version
Browse files Browse the repository at this point in the history
  • Loading branch information
m8rge committed Dec 19, 2016
1 parent 6347c37 commit 34e3192
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
12 changes: 12 additions & 0 deletions stub.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env php
<?php

if (!version_compare(PHP_VERSION, '5.5.0', '>=')) {
die("Php minimum version is 5.5\n");
}

if (class_exists('Phar')) {
Phar::mapPhar('default.phar');
require 'phar://' . __FILE__ . '/index.php';
}
__HALT_COMPILER(); ?>

0 comments on commit 34e3192

Please sign in to comment.