@@ -43,15 +43,15 @@ public static function getCommandName(): string
4343
4444 public static function getCommandDescription (): string
4545 {
46- return 'Create a twig (or live ) component ' ;
46+ return 'Create a Twig (or Live ) component ' ;
4747 }
4848
4949 public function configureCommand (Command $ command , InputConfiguration $ inputConfig ): void
5050 {
5151 $ command
5252 ->setDescription (self ::getCommandDescription ())
53- ->addArgument ('name ' , InputArgument::OPTIONAL , 'The name of your twig component (ie <fg=yellow>Notification</>) ' )
54- ->addOption ('live ' , null , InputOption::VALUE_NONE , 'Whether to create a live twig component (requires <fg=yellow>symfony/ux-live-component</>) ' )
53+ ->addArgument ('name ' , InputArgument::OPTIONAL , 'The name of your Twig component (ie <fg=yellow>Notification</>) ' )
54+ ->addOption ('live ' , null , InputOption::VALUE_NONE , 'Whether to create a Live component (requires <fg=yellow>symfony/ux-live-component</>) ' )
5555 ;
5656 }
5757
@@ -66,7 +66,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
6666 $ live = $ input ->getOption ('live ' );
6767
6868 if ($ live && !class_exists (AsLiveComponent::class)) {
69- throw new \RuntimeException ('You must install symfony/ux-live-component to create a live component (composer require symfony/ux-live-component) ' );
69+ throw new \RuntimeException ('You must install symfony/ux-live-component to create a Live component (composer require symfony/ux-live-component) ' );
7070 }
7171
7272 $ factory = $ generator ->createClassNameDetails (
@@ -100,7 +100,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
100100 public function interact (InputInterface $ input , ConsoleStyle $ io , Command $ command ): void
101101 {
102102 if (!$ input ->getOption ('live ' )) {
103- $ input ->setOption ('live ' , $ io ->confirm ('Make this a live component? ' , false ));
103+ $ input ->setOption ('live ' , $ io ->confirm ('Make this a Live component? ' , false ));
104104 }
105105
106106 $ path = 'config/packages/twig_component.yaml ' ;
@@ -113,7 +113,7 @@ public function interact(InputInterface $input, ConsoleStyle $io, Command $comma
113113 $ value = Yaml::parse ($ this ->fileManager ->getFileContents ($ path ));
114114 $ this ->namespace = array_key_first ($ value ['twig_component ' ]['defaults ' ]);
115115 } catch (\Throwable $ throwable ) {
116- throw new RuntimeCommandException (message: 'Unable to parse twig_component.yaml ' , previous: $ throwable );
116+ throw new RuntimeCommandException (message: 'Unable to parse config/packages/ twig_component.yaml ' , previous: $ throwable );
117117 }
118118 }
119119}
0 commit comments