Closed
Description
For people looking for a micro-framework for cli, the Console component provides a fluent interface to declare commands. I don't find it in the doc.
Example:
$app->register('hello')
->addArgument('name', InputArgument::OPTIONAL, '', 'World!')
->setCode(function (InputInterface $input, OutputInterface $output): int {
$output->writeln('Hello, ' . $input->getArgument('name'));
return Command::SUCCESS;
});
This should be pointed in this section of the doc. Maybe with a dedicated page.
https://symfony.com/doc/current/components/console.html#creating-a-console-application
Existing frameworks are good at presenting this feature, but are almost unmaintained (Silly, Cylex).
(Triggered by brefphp/bref#1117)
Metadata
Metadata
Assignees
Labels
A Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.