From 9582635449c28c785daf98577e4563ed30477417 Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Tue, 22 Feb 2022 08:29:54 +0100 Subject: [PATCH] Mention use statements for classes (#1722) main, 11.5 --- Documentation/ApiOverview/CommandControllers/Index.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/ApiOverview/CommandControllers/Index.rst b/Documentation/ApiOverview/CommandControllers/Index.rst index c534071c73..5e97be5936 100644 --- a/Documentation/ApiOverview/CommandControllers/Index.rst +++ b/Documentation/ApiOverview/CommandControllers/Index.rst @@ -138,6 +138,10 @@ command API. This is explained in depth on the following Symfony Documentation p Add an optional argument and an optional option to your command:: + + // use Symfony\Component\Console\Input\InputArgument; + // use Symfony\Component\Console\Input\InputOption; + /** * Configure the command by defining the name, options and arguments */ @@ -169,6 +173,9 @@ which can be passed on the command line: This argument can be retrieved with :php:`$input->getArgument()`, the options with :php:`$input->getOption()`, for example:: + // use Symfony\Component\Console\Input\InputInterface; + // use Symfony\Component\Console\Output\OutputInterface; + protected function execute(InputInterface $input, OutputInterface $output) { // ...