Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Nov 9, 2024
1 parent 55b3275 commit ab5bab9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Support/PhpExecutableFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ class PhpExecutableFinder extends SymfonyPhpExecutableFinder
public function find(bool $includeArgs = true): string|false
{
if ($herdPath = getenv('HERD_HOME')) {
return (new ExecutableFinder)->find('php', false, [join_paths($herdPath, 'bin')]);
return (new ExecutableFinder)->find(name: 'php', extraDirs: [join_paths($herdPath, 'bin')]) ?? false;
}

return parent::find($includeArgs);
}
}
}
10 changes: 5 additions & 5 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,15 +405,15 @@ function phpunit_version_compare(string $version, ?string $operator = null)

/**
* Determine the PHP Binary.
*
*
* @api
*
* @param bool $escape
*
* @param bool $escape
* @return string
*/
function php_binary(bool $escape = false): string
function php_binary(bool $escape = false): string
{
$phpBinary = (new Support\PhpExecutableFinder)->find(false) ?: PHP_BINARY;
$phpBinary = (new Support\PhpExecutableFinder)->find(false) ?: 'php';

return $escape === true ? ProcessUtils::escapeArgument((string) $phpBinary) : $phpBinary;
}
Expand Down

0 comments on commit ab5bab9

Please sign in to comment.