Closed
Description
I'm having problems with the testsuite and it seems that it fails for the latest changes, too.
Actually there seems to be several problems.
make:migration
possibly related to doctrine/migrations-bundle update make:migration runs indefinitely #643 make:migration command is not in agreement with doctrine/migrations:"^3.0" #642make:auth
,make:entity
,make:subscriber
andmake:form
are aborting the make command when there is input.
This only seems to occur on PHP 7.3 in Travis and locally also on my PHP 7.4.7
https://travis-ci.org/github/symfony/maker-bundle/jobs/704032589
I've encountered the "Aborted." errors in my tests for make:dto
and was able to avoid them when using setArgumentsString()
.
This fails:
yield 'dto_no_mutator' => [MakerTestDetails::createTest(
$this->getMakerInstance(MakeDto::class),
[
'TaskData',
'Task',
// Mutable public (for simplicity)
2,
// Add no mutator to Entity
'no',
])
->addExtraDependencies('doctrine')
->addExtraDependencies('validator')
->setFixtureFilesPath(__DIR__.'/../fixtures/MakeDtoNoMutator')
->assert(function (string $output) {
$this->assertContains('created: src/Dto/TaskData.php', $output);
$this->assertContains('updated: src/Dto/TaskData.php', $output);
}),
];
while this succeeds:
yield 'dto_no_mutator' => [MakerTestDetails::createTest(
$this->getMakerInstance(MakeDto::class),
[
- 'TaskData',
- 'Task',
// Mutable public (for simplicity)
2,
// Add no mutator to Entity
'no',
])
+ ->setArgumentsString('TaskData Task')
->addExtraDependencies('doctrine')
->addExtraDependencies('validator')
->setFixtureFilesPath(__DIR__.'/../fixtures/MakeDtoNoMutator')
->assert(function (string $output) {
$this->assertContains('created: src/Dto/TaskData.php', $output);
$this->assertContains('updated: src/Dto/TaskData.php', $output);
}),
];
I think this is related to command arguments being added outside of configureCommand
(#626), but could not completely track it down.
Maybe it's also related to #633 and #629
I'm having another bug in the test above, the 'no' input for the ChoiceQuestion
always comes out as a boolean.
It's passed correctly in MakerTestEnvironment::runMaker()
.