diff --git a/console.rst b/console.rst index 4038c16f83e..eb7e2e99ec1 100644 --- a/console.rst +++ b/console.rst @@ -171,6 +171,12 @@ You can optionally define a description, help message and the classes, but it won't show any description for commands that use the ``setDescription()`` method instead of the static property. +.. deprecated:: 6.1 + + The static property ``$defaultDescription`` was deprecated in Symfony 6.1. + Declare your command description with the ``#[AsCommand]`` attribute + instead. + The ``configure()`` method is called automatically at the end of the command constructor. If your command defines its own constructor, set the properties first and then call to the parent constructor, to make those properties @@ -234,6 +240,11 @@ 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 `. +.. deprecated:: 6.1 + + The static property ``$defaultName`` was deprecated in Symfony 6.1. + Declare your command name with the ``#[AsCommand]`` attribute instead. + Running the Command ~~~~~~~~~~~~~~~~~~~