Skip to content

Commit 44818bc

Browse files
committed
minor #778 Move symfony/process dependency from require-dev to require (franmomu)
This PR was merged into the 1.0-dev branch. Discussion ---------- Move symfony/process dependency from require-dev to require Hi! I was trying to use [`MakerTestCase`](https://github.com/symfony/maker-bundle/blob/a47408fa6e39034a5abe324a46f4e6733266267a/src/Test/MakerTestCase.php) and I'm finding some little things. In this case, `symfony/process` is being used under the src directory in two files: - [src/Test/MakerTestProcess.php](https://github.com/symfony/maker-bundle/blob/a47408fa6e39034a5abe324a46f4e6733266267a/src/Test/MakerTestProcess.php#L14) - [src/Test/MakerTestEnvironment.php](https://github.com/symfony/maker-bundle/blob/a47408fa6e39034a5abe324a46f4e6733266267a/src/Test/MakerTestEnvironment.php#L18-L19) So trying to execute tests I'm getting: `Error: Class 'Symfony\Component\Process\Process' not found` Commits ------- 156134f Throw an exception if symfony/process is not installed
2 parents aa5da37 + 156134f commit 44818bc

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)