diff --git a/src/Adapters/Symfony/Component/Process/Process.php b/src/Adapters/Symfony/Component/Process/Process.php index 1ebae185c..05bdcb45e 100644 --- a/src/Adapters/Symfony/Component/Process/Process.php +++ b/src/Adapters/Symfony/Component/Process/Process.php @@ -79,4 +79,22 @@ public function createNewConsole(): void $options['bypass_shell'] = true; $optionsReflectionProperty->setValue($this, $options); } + + /** + * @param array $arguments + */ + public static function __callStatic(string $name, array $arguments):mixed + { + if ($name === 'fromShellCommandline') { + $command = array_shift($arguments); + $process = new self([], ...$arguments); // @phpstan-ignore-line + $processCommandLineProperty = new \ReflectionProperty(SymfonyProcess::class, 'commandline'); + $processCommandLineProperty->setAccessible(true); + $processCommandLineProperty->setValue($process, $command); + + return $process; + } + + return null; + } }