php-parallel-lint / PHP-Parallel-Lint

This tool check syntax of PHP files faster than serial check with fancier output.
Other
287 stars 21 forks source link

Script: allow running from git clone #9

Closed jrfnl closed 4 years ago

jrfnl commented 4 years ago

If you git clone the repo and run composer install and then call the program like so:

php path/to/gitclone/parallel-lint

For a non-composer based project, PHP-Parallel-Lint would fail with the following message:

You must set up the project dependencies, run the following commands:
curl -s http://getcomposer.org/installer | php
php composer.phar install

For a composer based project, i.e. which does have a vendor/autoload.php file, but that file may not contain references to the PHP-Parallel-Lint application, it would fail with the following hard error:

Fatal error: Uncaught Error: Class 'JakubOnderka\PhpParallelLint\Application' not found in path/to/gitclone/parallel-lint:66

This small change allows the application to work correctly in that situation.

This is the same PR as previously pulled in PR JakubOnderka/PHP-Parallel-Lint#149

jrfnl commented 4 years ago

Same fix applied in commit de81f0abc17444d3070e2c0623950ebf434f3361