@@ -43,15 +43,15 @@ public static function getCommandName(): string
43
43
44
44
public static function getCommandDescription (): string
45
45
{
46
- return 'Create a twig (or live ) component ' ;
46
+ return 'Create a Twig (or Live ) component ' ;
47
47
}
48
48
49
49
public function configureCommand (Command $ command , InputConfiguration $ inputConfig ): void
50
50
{
51
51
$ command
52
52
->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</>) ' )
55
55
;
56
56
}
57
57
@@ -66,7 +66,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
66
66
$ live = $ input ->getOption ('live ' );
67
67
68
68
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) ' );
70
70
}
71
71
72
72
$ factory = $ generator ->createClassNameDetails (
@@ -100,7 +100,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
100
100
public function interact (InputInterface $ input , ConsoleStyle $ io , Command $ command ): void
101
101
{
102
102
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 ));
104
104
}
105
105
106
106
$ path = 'config/packages/twig_component.yaml ' ;
@@ -113,7 +113,7 @@ public function interact(InputInterface $input, ConsoleStyle $io, Command $comma
113
113
$ value = Yaml::parse ($ this ->fileManager ->getFileContents ($ path ));
114
114
$ this ->namespace = array_key_first ($ value ['twig_component ' ]['defaults ' ]);
115
115
} 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 );
117
117
}
118
118
}
119
119
}
0 commit comments