package and depencies
This commit is contained in:
11
vendor/symfony/console/Helper/ProcessHelper.php
vendored
11
vendor/symfony/console/Helper/ProcessHelper.php
vendored
@@ -32,7 +32,7 @@ class ProcessHelper extends Helper
|
||||
* @param callable|null $callback A PHP callback to run whenever there is some
|
||||
* output available on STDOUT or STDERR
|
||||
*/
|
||||
public function run(OutputInterface $output, $cmd, string $error = null, callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE): Process
|
||||
public function run(OutputInterface $output, array|Process $cmd, string $error = null, callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE): Process
|
||||
{
|
||||
if (!class_exists(Process::class)) {
|
||||
throw new \LogicException('The ProcessHelper cannot be run as the Process component is not installed. Try running "compose require symfony/process".');
|
||||
@@ -48,10 +48,6 @@ class ProcessHelper extends Helper
|
||||
$cmd = [$cmd];
|
||||
}
|
||||
|
||||
if (!\is_array($cmd)) {
|
||||
throw new \TypeError(sprintf('The "command" argument of "%s()" must be an array or a "%s" instance, "%s" given.', __METHOD__, Process::class, get_debug_type($cmd)));
|
||||
}
|
||||
|
||||
if (\is_string($cmd[0] ?? null)) {
|
||||
$process = new Process($cmd);
|
||||
$cmd = [];
|
||||
@@ -98,7 +94,7 @@ class ProcessHelper extends Helper
|
||||
*
|
||||
* @see run()
|
||||
*/
|
||||
public function mustRun(OutputInterface $output, $cmd, string $error = null, callable $callback = null): Process
|
||||
public function mustRun(OutputInterface $output, array|Process $cmd, string $error = null, callable $callback = null): Process
|
||||
{
|
||||
$process = $this->run($output, $cmd, $error, $callback);
|
||||
|
||||
@@ -134,9 +130,6 @@ class ProcessHelper extends Helper
|
||||
return str_replace('<', '\\<', $str);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'process';
|
||||
|
Reference in New Issue
Block a user