8000 Merge branch '6.3' into 6.4 · symfony/symfony-docs@e530531 · GitHub
[go: up one dir, main page]

Skip to content

Commit e530531

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: [Console] Deprecate `$defaultName` and `$defaultDescription`
2 parents cae5951 + b0b7276 commit e530531

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

console.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ You can optionally define a description, help message and the
171171
classes, but it won't show any description for commands that use the
172172
``setDescription()`` method instead of the static property.
173173

174+
.. deprecated:: 6.1
175+
176+
The static property ``$defaultDescription`` was deprecated in Symfony 6.1.
177+
Instead, use the ``#[AsCommand]`` attribute to define the optional command
178+
description.
179+
174180
The ``configure()`` method is called automatically at the end of the command
175181
constructor. If your command defines its own constructor, set the properties
176182
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
234240
:ref:`default services.yaml configuration <service-container-services-load-example>`,
235241
this is already done for you, thanks to :ref:`autoconfiguration <services-autoconfigure>`.
236242

243+
.. deprecated:: 6.1
244+
245+
The static property ``$defaultName`` was deprecated in Symfony 6.1.
246+
Define your command name with the ``#[AsCommand]`` attribute instead.
247+
237248
Running the Command
238249
~~~~~~~~~~~~~~~~~~~
239250

0 commit comments

Comments
 (0)
0