diff --git a/box.json b/box.json index 951802d..17db203 100644 --- a/box.json +++ b/box.json @@ -2,10 +2,9 @@ "output": "parallel-lint.phar", "chmod": "0755", "compactors": [ - "Herrera\\Box\\Compactor\\Php" + "KevinGH\\Box\\Compactor\\Php" ], - "extract": false, - "main": "parallel-lint.php", + "main": "parallel-lint", "files": [ "LICENSE" ], @@ -23,6 +22,5 @@ "in": "bin" } ], - "stub": true, - "web": false + "stub": true } diff --git a/parallel-lint b/parallel-lint index 0d77fdb..fa8844b 100755 --- a/parallel-lint +++ b/parallel-lint @@ -35,9 +35,13 @@ if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50400) { exit(254); } +function isPhar() { + return class_exists('Phar') && (strlen(Phar::running()) > 0 ? true : false); +} + $autoloadLocations = [ - getcwd() . '/vendor/autoload.php', - getcwd() . '/../../autoload.php', + isPhar() ? "" : getcwd() . '/vendor/autoload.php', + isPhar() ? "" : getcwd() . '/../../autoload.php', __DIR__ . '/vendor/autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/../../../autoload.php',