10000 Minor tweaks · symfony/symfony-docs@57bf707 · GitHub
[go: up one dir, main page]

Skip to content

Commit 57bf707

Browse files
committed
Minor tweaks
1 parent 611eb54 commit 57bf707

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

components/console/helpers/progressindicator.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Progress Indicator
22
==================
33

4-
When executing longer-running commands without knowing if the the processing
5-
is nearly done or not, it may be helpful to show that something is actually
6-
happening and that updates as your command runs.
4+
Progress indicators are useful to let users know that a command isn't stalled.
5+
Unlike :doc:`progress bars </components/console/helpers/progressbar>`, these
6+
indicators are used when the command duration is indeterminate (e.g. long-running
7+
commands, unquantifiable tasks, etc.)
78

8-
To do so, use the
9-
:class:`Symfony\\Component\\Console\\Helper\\ProgressIndicator` and advance the
10-
progress as the command executes::
9+
They work by instantiating the :class:`Symfony\\Component\\Console\\Helper\\ProgressIndicator`
10+
class and advancing the progress as the command executes::
1111

1212
use Symfony\Component\Console\Helper\ProgressIndicator;
1313

@@ -57,10 +57,9 @@ level of verbosity of the ``OutputInterface`` instance:
5757
/ Processing... (1 sec, 6.0 MiB)
5858
- Processing... (1 sec, 6.0 MiB)
5959
60-
.. note::
60+
.. tip::
6161

62-
If you call a command with the quiet flag (``-q``), the progress indicator won't
63-
be displayed.
62+
Call a command with the quiet flag (``-q``) to not display any progress indicator.
6463

6564
Instead of relying on the verbosity mode of the current command, you can also
6665
force a format via the second argument of the ``ProgressIndicator``
@@ -108,8 +107,7 @@ built-in placeholders:
108107
* ``memory``: The current memory usage;
109108
* ``message``: used to display arbitrary messages in the progress indicator.
110109

111-
If you want to customize a placeholder, for example the ``message`` one, here
112-
is how you should do this::
110+
For example, this is how you can customize the ``message`` placeholder::
113111

114112
ProgressIndicator::setPlaceholderFormatterDefinition(
115113
'message',

0 commit comments

Comments
 (0)
0