Skip to content
Open
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
3 changes: 2 additions & 1 deletion console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,13 @@ If you can't use PHP attributes, register the command as a service and
:ref:`default services.yaml configuration <service-container-services-load-example>`,
this is already done for you, thanks to :ref:`autoconfiguration <services-autoconfigure>`.

You can also use ``#[AsCommand]`` to add a description and longer help text for the command::
You can also use ``#[AsCommand]`` to add a description, usages, and longer help text for the command::

#[AsCommand(
name: 'app:create-user',
description: 'Creates a new user.', // the command description shown when running "php bin/console list"
help: 'This command allows you to create a user...', // the command help shown when running the command with the "--help" option
usages: ['app:create-user alice'],
)]
class CreateUserCommand
{
Expand Down