-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Console] Add documentation for console command attributes #15123
New 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
Conversation
45f9eeb
to
ee18009
Compare
|
||
// the full command description shown when running the command with | ||
// the "--help" option | ||
->setHelp('This command allows you to create a user...') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add hidden
and aliases
in this example too?
app::new-user
could be used as an alias in both examples.
Thanks
console.rst
Outdated
|
||
.. code-block:: php-attributes | ||
|
||
// ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the use statement to ConsoleCommand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments, thanks
// ... | ||
protected function configure() | ||
{ | ||
$this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name
is missing in this example
console.rst
Outdated
name: 'app:create-user', | ||
description: 'Creates a new user.' | ||
hidden: false, | ||
aliases: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be interesting how to set the help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, help isn't supported in attributes and the use of setHelp()
is necessary.
Should I add it in addition to the attributes?
ee18009
to
0af2983
Compare
Closing in favor of #16333. Sorry we didn't merge this one, but we hope to get more contributions from you in the future. Thanks! |
This is the documentation for #15003.
I don't know if it's necessary to specify that not all properties (like 'help') are supported in the attributes, or if the documentation is clear enough as is. What do you think about it?