From eae1566ba5930179b2c69384c87cfac0560ad7c4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 23 Mar 2013 08:18:11 +0100 Subject: [PATCH] added a note about the new setCurrent method on the progress helper --- components/console/helpers/progresshelper.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 + }