@@ -7,7 +7,10 @@ messages, but you can control their verbosity with the ``-q`` and ``-v`` options
77
88.. code-block :: terminal
99
10- # do not output any message (not even the command result messages)
10+ # suppress all output, including errors
11+ $ php bin/console some-command --silent
12+
13+ # suppress all output (even the command result messages) but display errors
1114 $ php bin/console some-command -q
1215 $ php bin/console some-command --quiet
1316
@@ -23,13 +26,18 @@ messages, but you can control their verbosity with the ``-q`` and ``-v`` options
2326 # display all messages (useful to debug errors)
2427 $ php bin/console some-command -vvv
2528
29+ .. versionadded :: 7.2
30+
31+ The ``--silent `` option was introduced in Symfony 7.2.
32+
2633The verbosity level can also be controlled globally for all commands with the
2734``SHELL_VERBOSITY `` environment variable (the ``-q `` and ``-v `` options still
2835have more precedence over the value of ``SHELL_VERBOSITY ``):
2936
3037===================== ========================= ===========================================
3138Console option ``SHELL_VERBOSITY `` value Equivalent PHP constant
3239===================== ========================= ===========================================
40+ ``--silent `` ``-2 `` ``OutputInterface::VERBOSITY_SILENT ``
3341``-q `` or ``--quiet `` ``-1 `` ``OutputInterface::VERBOSITY_QUIET ``
3442(none) ``0 `` ``OutputInterface::VERBOSITY_NORMAL ``
3543``-v `` ``1 `` ``OutputInterface::VERBOSITY_VERBOSE ``
@@ -58,7 +66,7 @@ level. For example::
5866 'Password: '.$input->getArgument('password'),
5967 ]);
6068
61- // available methods: ->isQuiet(), ->isVerbose(), ->isVeryVerbose(), ->isDebug()
69+ // available methods: ->isSilent(), -> isQuiet(), ->isVerbose(), ->isVeryVerbose(), ->isDebug()
6270 if ($output->isVerbose()) {
6371 $output->writeln('User class: '.get_class($user));
6472 }
@@ -73,10 +81,19 @@ level. For example::
7381 }
7482 }
7583
76- When the quiet level is used, all output is suppressed as the default
84+ .. versionadded :: 7.2
85+
86+ The ``isSilent() `` method was introduced in Symfony 7.2.
87+
88+ When the silent or quiet level are used, all output is suppressed as the default
7789:method: `Symfony\\ Component\\ Console\\ Output\\ Output::write ` method returns
7890without actually printing.
7991
92+ .. tip ::
93+
94+ When using the ``silent `` verbosity, errors won't be displayed in the console
95+ but they will still be logged through the :doc: `Symfony logger </logging >` integration.
96+
8097.. tip ::
8198
8299 The MonologBridge provides a :class: `Symfony\\ Bridge\\ Monolog\\ Handler\\ ConsoleHandler `
0 commit comments