Update dependencies

This commit is contained in:
Chris Hunt
2024-02-16 21:36:54 +00:00
parent 22d7a59e59
commit d52ae0d3c3
9569 changed files with 460443 additions and 282416 deletions

View File

@@ -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) {