8000 [Console] Improve the description of command options by javiereguiluz · Pull Request #17006 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Console] Improve the description of command options #17006

N 8000 ew issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Console] Improve the description of command options
  • Loading branch information
javiereguiluz committed Jul 22, 2022
commit 14e501ffa8aca33fd37f4772901fedf4d60696cc
7 changes: 7 additions & 0 deletions console/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,17 @@ how many times in a row the message should be printed::
$this
// ...
->addOption(
// this is the name that users must type to pass this option (e.g. --iterations=5)
'iterations',
// this is the optional shortcut of the option name, which usually is just a letter
// (e.g. `i`, so users pass it as `-i`); use it for commonly used options
// or options with long names
null,
// this is the type of option (e.g. requires a value, can be passed more than once, etc.)
InputOption::VALUE_REQUIRED,
// the option description displayed when showing the command help
'How many times should the message be printed?',
// the default value of the option (for those which allow to pass values)
1
)
;
Expand Down
0