Skip to content

[Console] Deprecate $defaultName and $defaultDescription #18474

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

Merged
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
11 changes: 11 additions & 0 deletions console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -234,6 +240,11 @@ 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>`.

.. 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
~~~~~~~~~~~~~~~~~~~

Expand Down