Closed exussum12 closed 6 years ago
I don't think the condition is enough, because $_SERVER['_']
contains the executable which was used to run the PHP script which is fine, if you invoke the lint as php parallel-lint
, but it's not okay, when you run the tool directly: ./parallel-lint
, then it would contain the parallel-lint
executable, which is obviously not something you want to use to run the linting process.
Also these values of $_SERVER
are not documented, so I am not sure, if it is ok, to rely on them, at least it should be tested, that it is populated.
What about using realpath ('/proc/self/exe')
That should work in both cases ?
There is a PHP_BINARY
, since PHP 5.4, that should be imho prefered, if available.
Added that check @fprochazka Thanks!
Error on the build is HHVM being unsupported
Travis seem to have dropped 5,3 support too. Removing that from the build
Nice catch! I fixed build in master
branch, can you please remove commits that change build and rebase it to current master
?
Updated
Good spot. Sorted
Testing concerns should also be addressed, I guess. Other than that — thanks for the useful addition! That's something that could be useful for me as well 👍
Currently when multiple versions are installed, calling parallel lint with any of them invokes the default
php
on the path.