Commit f036ebf
committed
minor symfony#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 usage1 file changed
+1
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 45 | + | |
51 | 46 | | |
52 | 47 | | |
53 | 48 | | |
| |||
0 commit comments