Skip to content

Commit fbf5080

Browse files
committed
[Console] Update the hidden command doc when using the pipe syntax
1 parent 71b1c5e commit fbf5080

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

console.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ After configuring and registering the command, you can run it in the terminal:
206206
As you might expect, this command will do nothing as you didn't write any logic
207207
yet. Add your own logic inside the ``__invoke()`` method.
208208

209+
.. _command-aliases:
210+
209211
Command Aliases
210212
~~~~~~~~~~~~~~~
211213

console/hide_commands.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ the ``hidden`` property of the ``AsCommand`` attribute::
2222
// ...
2323
}
2424

25-
You can also define a command as hidden using the pipe (``|``) syntax in the
26-
command name::
25+
You can also define a command as hidden using the pipe (``|``) syntax of
26+
:ref:`command aliases <command-aliases>`. To do this, use the command name as one
27+
of the aliases and leave the main command name (the part before the ``|``) empty::
2728

2829
// src/Command/LegacyCommand.php
2930
namespace App\Command;
@@ -39,11 +40,7 @@ command name::
3940

4041
.. versionadded:: 7.4
4142

42-
The ability to define a command as hidden using the pipe syntax in the
43-
command name was introduced in Symfony 7.4.
44-
45-
Hidden commands behave the same as normal commands but they are no longer
46-
displayed in command listings, so end-users are not aware of their existence.
43+
Support for hidding commands using the pipe syntax was introduced in Symfony 7.4.
4744

4845
.. note::
4946

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy