minor #28409 [Console] Document what is validated before and after Command::initialize() (chalasr)

This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Document what is validated before and after Command::initialize()

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26611
| License       | MIT
| Doc PR        | n/a

Commits
-------

b1aff99 [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
This commit is contained in:
Robin Chalas 2018-09-10 19:22:51 +02:00
commit 86a5d92ce7
2 changed files with 7 additions and 1 deletions

View File

@ -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 * 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. * 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) protected function initialize(InputInterface $input, OutputInterface $output)
{ {

View File

@ -59,6 +59,8 @@ interface InputInterface
/** /**
* Binds the current Input instance with the given arguments and options. * Binds the current Input instance with the given arguments and options.
*
* @throws RuntimeException
*/ */
public function bind(InputDefinition $definition); public function bind(InputDefinition $definition);