diff --git a/components/console/helpers/progresshelper.rst b/components/console/helpers/progresshelper.rst index 757091ba20d..f77c52490cf 100644 --- a/components/console/helpers/progresshelper.rst +++ b/components/console/helpers/progresshelper.rst @@ -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: @@ -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 @@ -70,4 +79,4 @@ To see other available options, check the API documentation for if ($i % 100 == 0) { $progress->advance(); } - } \ No newline at end of file + }