From 7898cec102a054e1e6a179120c83e0fa755fa04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Thu, 7 Mar 2024 18:09:23 +0100 Subject: [PATCH] doc: add some explaination about the verbose option --- src/Console/Command/TaskCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Console/Command/TaskCommand.php b/src/Console/Command/TaskCommand.php index cdc2077c..54d415a6 100644 --- a/src/Console/Command/TaskCommand.php +++ b/src/Console/Command/TaskCommand.php @@ -108,6 +108,10 @@ protected function configure(): void $taskArgumentAttribute->suggestedValues, ); } elseif ($taskArgumentAttribute instanceof AsOption) { + if ('verbose' === $name) { + throw new FunctionConfigurationException('You cannot re-define a "verbose" option. But you can use "output()->isVerbose()" in your code instead.', $this->function); + } + $mode = $taskArgumentAttribute->mode; $defaultValue = $parameter->isOptional() ? $parameter->getDefaultValue() : null;