@@ -7,13 +7,13 @@ messages, but you can control their verbosity with the ``-q`` and ``-v`` options
7
7
8
8
.. code-block :: terminal
9
9
10
- # do not output any message (not even the command result messages) but display errors
11
- $ php bin/console some-command -q
12
- $ php bin/console some-command --quiet
13
-
14
10
# suppress all output, including errors
15
11
$ php bin/console some-command --silent
16
12
13
+ # suppress all output (even the command result messages) but display errors
14
+ $ php bin/console some-command -q
15
+ $ php bin/console some-command --quiet
16
+
17
17
# normal behavior, no option required (display only the useful messages)
18
18
$ php bin/console some-command
19
19
@@ -26,6 +26,10 @@ messages, but you can control their verbosity with the ``-q`` and ``-v`` options
26
26
# display all messages (useful to debug errors)
27
27
$ php bin/console some-command -vvv
28
28
29
+ .. versionadded :: 7.2
30
+
31
+ The ``--silent `` option was introduced in Symfony 7.2.
32
+
29
33
The verbosity level can also be controlled globally for all commands with the
30
34
``SHELL_VERBOSITY `` environment variable (the ``-q `` and ``-v `` options still
31
35
have more precedence over the value of ``SHELL_VERBOSITY ``):
@@ -41,10 +45,6 @@ Console option ``SHELL_VERBOSITY`` value Equivalent PHP constant
41
45
``-vvv `` ``3 `` ``OutputInterface::VERBOSITY_DEBUG ``
42
46
===================== ========================= ===========================================
43
47
44
- .. versionadded :: 7.2
45
-
46
- The ``--silent `` option was introduced in Symfony 7.2.
47
-
48
48
It is possible to print a message in a command for only a specific verbosity
49
49
level. For example::
50
50
@@ -66,7 +66,7 @@ level. For example::
66
66
'Password: '.$input->getArgument('password'),
67
67
]);
68
68
69
- // available methods: ->isQuiet(), ->isVerbose(), ->isVeryVerbose(), ->isDebug()
69
+ // available methods: ->isSilent(), -> isQuiet(), ->isVerbose(), ->isVeryVerbose(), ->isDebug()
70
70
if ($output->isVerbose()) {
71
71
$output->writeln('User class: '.get_class($user));
72
72
}
@@ -81,10 +81,19 @@ level. For example::
81
81
}
82
82
}
83
83
84
- 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
85
89
:method: `Symfony\\ Component\\ Console\\ Output\\ Output::write ` method returns
86
90
without actually printing.
87
91
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 </logger >` integration.
96
+
88
97
.. tip ::
89
98
90
99
The MonologBridge provides a :class: `Symfony\\ Bridge\\ Monolog\\ Handler\\ ConsoleHandler `
0 commit comments