Using SymfonyStyle with Helpers #61025
-
With the new This means that for cases where we use helpers but still want to use SymfonyStyle for other things, we have to do this, which feels gross: public function __invoke(
SymfonyStyle $io,
InputInterface $input,
OutputInterface $output,
#[Argument('Some name')] string $name,
): int { That leads me to ask, shouldn't there be a way to get the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ah right, forgot |
Beta Was this translation helpful? Give feedback.
Ah right, forgot
$style->askQuestion()
is a thing, so that helps with that case. Also for TreeHelperSymfonyStyle
is anOutputInterface
so it can be passed in to most output-only helpers. Also there'sInputAwareInterface
that helpers can have to get it filled in I guess. So I guess it's fine as-is.