JakubOnderka / PHP-Parallel-Lint

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

Require vendor/autoload in bin #107

Open janvernieuwe opened 7 years ago

janvernieuwe commented 7 years ago

When running parallel lint in a build step, symlinks are not always kepth between build steps.

PHP Warning:  require(/data/home/bamboo/bamboo-agent-home/xml-data/build-dir/RVFR-NTB233-GET/bin/parallel-lint.php): failed to open stream: No such file or directory in /data/home/bamboo/bamboo-agent-home/xml-data/build-dir/RVFR-NTB233-GET/bin/parallel-lint on line 4
15-Nov-2017 12:13:58    PHP Fatal error:  require(): Failed opening required '/data/home/bamboo/bamboo-agent-home/xml-data/build-dir/RVFR-NTB233-GET/bin/parallel-lint.php' (include_path='.:/usr/local/zend/share/pear') in /data/home/bamboo/bamboo-agent-home/xml-data/build-dir/RVFR-NTB233-GET/bin/parallel-lint on line 4
15-Nov-2017 12:13:58    To skip commit checks, add -n or --no-verify flag to commit command

Other tasks attempt to load the vendor/autoload.php and do not seem to have this issue. Have not been able to test yet if require-ing the autoloader does indeed fixes the issue above.

janvernieuwe commented 7 years ago

Linking the file manually makes it work, but it would be nice if it also would work when the symlink is not set.

ln -sf $(realpath vendor/jakub-onderka/php-parallel-lint/parallel-lint) bin/parallel-lint