From fbf50800fb5798d7bb4827a8d92a3577a8701c96 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 1 Jul 2025 13:12:49 +0200 Subject: [PATCH] [Console] Update the hidden command doc when using the pipe syntax --- console.rst | 2 ++ console/hide_commands.rst | 11 ++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/console.rst b/console.rst index 0ec6f28b02a..0aeece2dc09 100644 --- a/console.rst +++ b/console.rst @@ -206,6 +206,8 @@ After configuring and registering the command, you can run it in the terminal: As you might expect, this command will do nothing as you didn't write any logic yet. Add your own logic inside the ``__invoke()`` method. +.. _command-aliases: + Command Aliases ~~~~~~~~~~~~~~~ diff --git a/console/hide_commands.rst b/console/hide_commands.rst index 17bcf37a8f9..aad4b6d45a4 100644 --- a/console/hide_commands.rst +++ b/console/hide_commands.rst @@ -22,8 +22,9 @@ the ``hidden`` property of the ``AsCommand`` attribute:: // ... } -You can also define a command as hidden using the pipe (``|``) syntax in the -command name:: +You can also define a command as hidden using the pipe (``|``) syntax of +:ref:`command aliases `. To do this, use the command name as one +of the aliases and leave the main command name (the part before the ``|``) empty:: // src/Command/LegacyCommand.php namespace App\Command; @@ -39,11 +40,7 @@ command name:: .. versionadded:: 7.4 - The ability to define a command as hidden using the pipe syntax in the - command name was introduced in Symfony 7.4. - -Hidden commands behave the same as normal commands but they are no longer -displayed in command listings, so end-users are not aware of their existence. + Support for hidding commands using the pipe syntax was introduced in Symfony 7.4. .. note:: 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