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:
commit
86a5d92ce7
@ -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)
|
||||
{
|
||||
|
@ -59,6 +59,8 @@ interface InputInterface
|
||||
|
||||
/**
|
||||
* Binds the current Input instance with the given arguments and options.
|
||||
*
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function bind(InputDefinition $definition);
|
||||
|
||||
|
Reference in New Issue
Block a user