-
Notifications
You must be signed in to change notification settings - Fork 60
Use the current invoked version of PHP #96
Conversation
I don't think the condition is enough, because Also these values of |
What about using realpath ('/proc/self/exe') That should work in both cases ? |
There is a |
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 |
Updated |
src/Settings.php
Outdated
$arguments = new ArrayIterator(array_slice($arguments, 1)); | ||
$settings = new self; | ||
|
||
//use the currently invoked php as the default if possible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just small code style: Can you please put space after //
and start commend with big letter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/Settings.php
Outdated
$settings = new self; | ||
|
||
// Use the currently invoked php as the default if possible | ||
if (defined(PHP_BINARY)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defined
takes string with a constant name as an argument, so here it checks if a constant with name /usr/bin/php
or alike (PHP_BINARY
's value) is defined which would most likely be false, so $settings->phpExecutable
will likely never be set. Shouldn't it be defined('PHP_BINARY')
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True! @exussum12 Can you fix it?
Good spot. Sorted |
Testing concerns should also be addressed, I guess. |
Currently when multiple versions are installed, calling parallel lint
with any of them invokes the default
php
on the path.