mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-16 11:53:49 +09:00
Update dependencies
This commit is contained in:
16
vendor/symfony/process/PhpExecutableFinder.php
vendored
16
vendor/symfony/process/PhpExecutableFinder.php
vendored
@@ -19,7 +19,7 @@ namespace Symfony\Component\Process;
|
||||
*/
|
||||
class PhpExecutableFinder
|
||||
{
|
||||
private $executableFinder;
|
||||
private ExecutableFinder $executableFinder;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -28,15 +28,13 @@ class PhpExecutableFinder
|
||||
|
||||
/**
|
||||
* Finds The PHP executable.
|
||||
*
|
||||
* @return string|false
|
||||
*/
|
||||
public function find(bool $includeArgs = true)
|
||||
public function find(bool $includeArgs = true): string|false
|
||||
{
|
||||
if ($php = getenv('PHP_BINARY')) {
|
||||
if (!is_executable($php)) {
|
||||
$command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v';
|
||||
if ($php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) {
|
||||
$command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v --';
|
||||
if (\function_exists('exec') && $php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) {
|
||||
if (!is_executable($php)) {
|
||||
return false;
|
||||
}
|
||||
@@ -56,7 +54,7 @@ class PhpExecutableFinder
|
||||
$args = $includeArgs && $args ? ' '.implode(' ', $args) : '';
|
||||
|
||||
// PHP_BINARY return the current sapi executable
|
||||
if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cgi-fcgi', 'cli', 'cli-server', 'phpdbg'], true)) {
|
||||
if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cli', 'cli-server', 'phpdbg'], true)) {
|
||||
return \PHP_BINARY.$args;
|
||||
}
|
||||
|
||||
@@ -88,10 +86,8 @@ class PhpExecutableFinder
|
||||
|
||||
/**
|
||||
* Finds the PHP executable arguments.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function findArguments()
|
||||
public function findArguments(): array
|
||||
{
|
||||
$arguments = [];
|
||||
if ('phpdbg' === \PHP_SAPI) {
|
||||
|
||||
Reference in New Issue
Block a user