diff --git a/console.rst b/console.rst index a9457c1620f..361984066fb 100644 --- a/console.rst +++ b/console.rst @@ -147,12 +147,13 @@ If you can't use PHP attributes, register the command as a service and :ref:`default services.yaml configuration `, this is already done for you, thanks to :ref:`autoconfiguration `. -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 {