You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If more than one kit is available, we ask the user which one to use
109
109
if (($availableKitsCount = \count($availableKits)) > 1) {
110
-
$kitName = $io->choice(null === $componentName ? 'Which kit do you want to use?' : \sprintf('The component "%s" exists in multiple kits. Which one do you want to use?', $componentName), array_map(fn (Kit$kit) => $kit->manifest->name, $availableKits));
110
+
$kitName = $io->choice(null === $recipeName ? 'Which kit do you want to use?' : \sprintf('The recipe "%s" exists in multiple kits. Which one do you want to use?', $recipeName), array_map(fn (Kit$kit) => $kit->manifest->name, $availableKits));
111
111
112
112
foreach ($availableKitsas$availableKit) {
113
113
if ($availableKit->manifest->name === $kitName) {
@@ -118,9 +118,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
118
118
} elseif (1 === $availableKitsCount) {
119
119
$kit = $availableKits[0];
120
120
} else {
121
-
$io->error(null === $componentName
121
+
$io->error(null === $recipeName
122
122
? 'It seems that no local kits are available and it should not happens. Please open an issue on https://github.com/symfony/ux to report this.'
123
-
: \sprintf("The component\"%s\" does not exist in any official kits.\n\nYou can try to run one of the following commands to interactively install components:\n%s\n\nOr you can try one of the community kits https://github.com/search?q=topic:ux-toolkit&type=repositories", $componentName, implode("\n", array_map(fn (string$availableKitName) => \sprintf('$ bin/console %s --kit %s', $this->getName(), $availableKitName), $availableKitNames)))
123
+
: \sprintf("The recipe\"%s\" does not exist in any official kits.\n\nYou can try to run one of the following commands to interactively install recipes:\n%s\n\nOr you can try one of the community kits https://github.com/search?q=topic:ux-toolkit&type=repositories", $recipeName, implode("\n", array_map(fn (string$availableKitName) => \sprintf('$ bin/console %s --kit %s', $this->getName(), $availableKitName), $availableKitNames)))
124
124
);
125
125
126
126
return Command::FAILURE;
@@ -130,25 +130,25 @@ protected function execute(InputInterface $input, OutputInterface $output): int
130
130
$kit = $registry->getKit($kitName);
131
131
}
132
132
133
-
if (null === $componentName) {
134
-
// Ask for the component name if not provided
135
-
$componentName = $io->choice('Which component do you want to install?', array_map(fn (Recipe$recipe) => $recipe->manifest->name, $this->getAvailableRecipes($kit)));
0 commit comments