-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
ConsoleactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.
Description
Commands have 3 lifecycle methods:
initialize($input, $output)
interact($input, $output)
execute($input, $output)
At first, they might seem redundant and the docs doesn't tell a lot about the difference between them. It turns out interact()
is called before the validation of the input definition. This means that this is the only place where the command can interactively ask for values of missing options. executes()
contains the logic of the Command. It's the only required method of the three.
Metadata
Metadata
Assignees
Labels
ConsoleactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.