diff --git a/build/phar/autoload.php.in b/build/phar/autoload.php.in index 090a810c..0052e79a 100644 --- a/build/phar/autoload.php.in +++ b/build/phar/autoload.php.in @@ -22,6 +22,8 @@ spl_autoload_register( Phar::mapPhar('phpdox.phar'); define('PHPDOX_PHAR', 'phpdox.phar'); +require 'phar://phpdox.phar/phpdox/runtimecheck.php'; + $factory = new TheSeer\phpDox\Factory( new \TheSeer\phpDox\FileInfo('phar://' . PHPDOX_PHAR), new \TheSeer\phpDox\Version('___VERSION___') diff --git a/phpdox b/phpdox index 4f19b1ea..6030bfaf 100755 --- a/phpdox +++ b/phpdox @@ -40,19 +40,7 @@ * */ -if (!defined('HHVM_VERSION') && (version_compare(phpversion(), '5.5', 'lt'))) { - fwrite( - STDERR, - sprintf( - "phpDox requires PHP 5.5 or later; " . - "Upgrading to the latest version of PHP is highly recommended. (Version used: %s)\n\n", - phpversion() - ) - ); - - die(1); -} - +require __DIR__ . '/src/runtimecheck.php'; require __DIR__ . '/src/autoload.php'; $found = false; @@ -73,7 +61,7 @@ if (!$found) { $factory = new TheSeer\phpDox\Factory( new \TheSeer\phpDox\FileInfo(__DIR__), - new \TheSeer\phpDox\Version('0.11.0-dev') + new \TheSeer\phpDox\Version('0.10.1') ); exit($factory->getCLI()->run( new TheSeer\phpDox\CLIOptions($_SERVER['argv']) diff --git a/src/runtimecheck.php b/src/runtimecheck.php new file mode 100644 index 00000000..e17ada22 --- /dev/null +++ b/src/runtimecheck.php @@ -0,0 +1,33 @@ +