Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion components/console/helpers/progresshelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Progress Helper
.. versionadded:: 2.2
The ``progress`` helper was added in Symfony 2.2.

.. versionadded:: 2.3
The ``setCurrent`` method was added in Symfony 2.3.

When executing longer-running commands, it may be helpful to show progress
information, which updates as your command runs:

Expand All @@ -28,6 +31,12 @@ pass it a total number of units, and advance the progress as your command execut

$progress->finish();

.. tip::

You can also set the current progress by calling the
:method:`Symfony\\Component\\Console\\Helper\\ProgressHelper::setCurrent`
method.

The appearance of the progress output can be customized as well, with a number
of different levels of verbosity. Each of these displays different possible
items - like percentage completion, a moving progress bar, or current/total
Expand Down Expand Up @@ -70,4 +79,4 @@ To see other available options, check the API documentation for
if ($i % 100 == 0) {
$progress->advance();
}
}
}