Skip to content

Commit 73bb47b

Browse files
committed
[Console] Fix symfony#5897 - Console component require Shell component
When setting the process isolation of a shell to true: `setProcessIsolation(true)` throw a `\RuntimeException` if the Process component isn't available.
1 parent 275cf8c commit 73bb47b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Console/Shell.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,9 @@ public function getProcessIsolation()
203203
public function setProcessIsolation($processIsolation)
204204
{
205205
$this->processIsolation = (Boolean) $processIsolation;
206+
207+
if ($this->processIsolation && !class_exists('Symfony\\Component\\Process\\Process')) {
208+
throw new \RuntimeException('Unable to isolate processes as the Symfony Process Component is not installed.');
209+
}
206210
}
207211
}

0 commit comments

Comments
 (0)