diff --git a/src/Maker/MakeTwigComponent.php b/src/Maker/MakeTwigComponent.php index 64390c475..669d92b51 100644 --- a/src/Maker/MakeTwigComponent.php +++ b/src/Maker/MakeTwigComponent.php @@ -91,7 +91,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen public function interact(InputInterface $input, ConsoleStyle $io, Command $command): void { if (!$input->getOption('live')) { - $input->setOption('live', $io->confirm('Make this a live component?', class_exists(AsLiveComponent::class))); + $input->setOption('live', $io->confirm('Make this a live component?', false)); } } } diff --git a/tests/Maker/MakeTwigComponentTest.php b/tests/Maker/MakeTwigComponentTest.php index ecbb314d2..51cc29fcf 100644 --- a/tests/Maker/MakeTwigComponentTest.php +++ b/tests/Maker/MakeTwigComponentTest.php @@ -58,7 +58,7 @@ public function getTestDetails(): \Generator yield 'it_generates_live_component' => [$this->createMakerTest() ->addExtraDependencies('symfony/ux-live-component', 'symfony/twig-bundle') ->run(function (MakerTestRunner $runner) { - $output = $runner->runMaker(['Alert']); + $output = $runner->runMaker(['Alert', 'y']); $this->assertStringContainsString('src/Twig/Components/Alert.php', $output); $this->assertStringContainsString('templates/components/Alert.html.twig', $output); @@ -76,7 +76,7 @@ public function getTestDetails(): \Generator yield 'it_generates_pascal_case_live_component' => [$this->createMakerTest() ->addExtraDependencies('symfony/ux-live-component', 'symfony/twig-bundle') ->run(function (MakerTestRunner $runner) { - $output = $runner->runMaker(['FormInput']); + $output = $runner->runMaker(['FormInput', 'y']); $this->assertStringContainsString('src/Twig/Components/FormInput.php', $output); $this->assertStringContainsString('templates/components/FormInput.html.twig', $output);