Skip to content

Commit f036ebf

Browse files
committed
minor #20683 [Console] Remove invalid ProcessHelper specified usage (viviengaetan)
This PR was merged into the 6.4 branch. Discussion ---------- [Console] Remove invalid ProcessHelper specified usage Since Symfony 6.0, the ProcessHelper have the `$cmd` argument from its two methods `run()` and `mustRun()` typed as `array|Process` [source](https://github.com/symfony/symfony/blob/6.0/src/Symfony/Component/Console/Helper/ProcessHelper.php). When you try to run as described in the documentation with a string, PHP will throw a TypeError ``` Fatal error: Uncaught TypeError: Symfony\Component\Console\Helper\ProcessHelper::run(): Argument #2 ($cmd) must be of type Symfony\Component\Process\Process|array, string given, called in /app/src/FooCommand.php on line 22 and defined in /app/vendor/symfony/console/Helper/ProcessHelper.php:35 ``` Documentation is invalid since 6.0 up to the latest version. Commits ------- 4f64107 [Console] Remove invalid ProcessHelper specified usage
2 parents 104e43c + 4f64107 commit f036ebf

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

components/console/helpers/processhelper.rst

+1-6
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,7 @@ In case the process fails, debugging is easier:
4242
Arguments
4343
---------
4444

45-
There are three ways to use the process helper:
46-
47-
* Using a command line string::
48-
49-
// ...
50-
$helper->run($output, 'figlet Symfony');
45+
There are two ways to use the process helper:
5146

5247
* An array of arguments::
5348

0 commit comments

Comments
 (0)