Skip to content

Commit 3ab76e4

Browse files
l-vofabpot
authored andcommitted
Add meaningful message when Process is not installed (ProcessHelper)
1 parent 03cad5a commit 3ab76e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Console/Helper/ProcessHelper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ class ProcessHelper extends Helper
3737
*/
3838
public function run(OutputInterface $output, $cmd, $error = null, callable $callback = null, $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE)
3939
{
40+
if (!class_exists(Process::class)) {
41+
throw new \LogicException('The Process helper requires the "Process" component. Install "symfony/process" to use it.');
42+
}
43+
4044
if ($output instanceof ConsoleOutputInterface) {
4145
$output = $output->getErrorOutput();
4246
}

0 commit comments

Comments
 (0)