8000 feature #1464 [make:twig-component] default to "no" when asking if is… · symfony/maker-bundle@6691a56 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6691a56

Browse files
authored
feature #1464 [make:twig-component] default to "no" when asking if is live component
1 parent cdcd168 commit 6691a56

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Maker/MakeTwigComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
9191
public function interact(InputInterface $input, ConsoleStyle $io, Command $command): void
9292
{
9393
if (!$input->getOption('live')) {
94-
$input->setOption('live', $io->confirm('Make this a live component?', class_exists(AsLiveComponent::class)));
94+
$input->setOption('live', $io->confirm('Make this a live component?', false));
9595
}
9696
}
9797
}

tests/Maker/MakeTwigComponentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getTestDetails(): \Generator
5858
yield 'it_generates_live_component' => [$this->createMakerTest()
5959
->addExtraDependencies('symfony/ux-live-component', 'symfony/twig-bundle')
6060
->run(function (MakerTestRunner $runner) {
61-
$output = $runner->runMaker(['Alert']);
61+
$output = $runner->runMaker(['Alert', 'y']);
6262

6363
$this->assertStringContainsString('src/Twig/Components/Alert.php', $output);
6464
$this->assertStringContainsString('templates/components/Alert.html.twig', $output);
@@ -76,7 +76,7 @@ public function getTestDetails(): \Generator
7676
yield 'it_generates_pascal_case_live_component' => [$this->createMakerTest()
7777
->addExtraDependencies('symfony/ux-live-component', 'symfony/twig-bundle')
7878
->run(function (MakerTestRunner $runner) {
79-
$output = $runner->runMaker(['FormInput']);
79+
$output = $runner->runMaker(['FormInput', 'y']);
8080

8181
$this->assertStringContainsString('src/Twig/Components/FormInput.php', $output);
8282
$this->assertStringContainsString('templates/components/FormInput.html.twig', $output);

0 commit comments

Comments
 (0)
0