From b1aff9993c1d320f34d38bf246036c77bd610b62 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sat, 8 Sep 2018 20:42:42 +0200 Subject: [PATCH] [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions --- src/Symfony/Component/Console/Command/Command.php | 6 +++++- src/Symfony/Component/Console/Input/InputInterface.php | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 1f4b845fca..70b4546fde 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -163,10 +163,14 @@ class Command } /** - * Initializes the command just after the input has been validated. + * Initializes the command after the input has been bound and before the input + * is validated. * * This is mainly useful when a lot of commands extends one main command * where some things need to be initialized based on the input arguments and options. + * + * @see InputInterface::bind() + * @see InputInterface::validate() */ protected function initialize(InputInterface $input, OutputInterface $output) { diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php index 805ee51736..1bce4d0635 100644 --- a/src/Symfony/Component/Console/Input/InputInterface.php +++ b/src/Symfony/Component/Console/Input/InputInterface.php @@ -59,6 +59,8 @@ interface InputInterface /** * Binds the current Input instance with the given arguments and options. + * + * @throws RuntimeException */ public function bind(InputDefinition $definition);