Skip to content

Commit 156134f

Browse files
committed
Throw an exception if symfony/process is not installed
1 parent a47408f commit 156134f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Test/MakerTestCase.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use PHPUnit\Framework\TestCase;
1616
use Symfony\Bundle\MakerBundle\MakerInterface;
1717
use Symfony\Bundle\MakerBundle\Str;
18+
use Symfony\Component\Process\Process;
1819

1920
abstract class MakerTestCase extends TestCase
2021
{
@@ -32,6 +33,10 @@ abstract public function getTestDetails();
3233

3334
protected function executeMakerCommand(MakerTestDetails $testDetails)
3435
{
36+
if (!class_exists(Process::class)) {
37+
throw new \LogicException('The MakerTestCase cannot be run as the Process component is not installed. Try running "compose require --dev symfony/process".');
38+
}
39+
3540
if (!$testDetails->isSupportedByCurrentPhpVersion()) {
3641
$this->markTestSkipped();
3742
}

0 commit comments

Comments
 (0)