[Process] Make PhpExecutableFinder
look for the PHP_BINARY
env var
This commit is contained in:
parent
cf898572a0
commit
4bd01f252f
@ -5,6 +5,7 @@ CHANGELOG
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
* added the `Process::isTtySupported()` method that allows to check for TTY support
|
* added the `Process::isTtySupported()` method that allows to check for TTY support
|
||||||
|
* made `PhpExecutableFinder` look for the `PHP_BINARY` env var when searching the php binary
|
||||||
|
|
||||||
4.0.0
|
4.0.0
|
||||||
-----
|
-----
|
||||||
|
@ -35,6 +35,14 @@ class PhpExecutableFinder
|
|||||||
*/
|
*/
|
||||||
public function find($includeArgs = true)
|
public function find($includeArgs = true)
|
||||||
{
|
{
|
||||||
|
if ($php = getenv('PHP_BINARY')) {
|
||||||
|
if (!is_executable($php)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $php;
|
||||||
|
}
|
||||||
|
|
||||||
$args = $this->findArguments();
|
$args = $this->findArguments();
|
||||||
$args = $includeArgs && $args ? ' '.implode(' ', $args) : '';
|
$args = $includeArgs && $args ? ' '.implode(' ', $args) : '';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user