Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b06db8

Browse files
committed
Merge pull request #2342 from fabpot/progress-helper
added a note about the new setCurrent method on the progress helper
2 parents f3c431f + eae1566 commit 7b06db8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

components/console/helpers/progresshelper.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Progress Helper
77
.. versionadded:: 2.2
88
The ``progress`` helper was added in Symfony 2.2.
99

10+
.. versionadded:: 2.3
11+
The ``setCurrent`` method was added in Symfony 2.3.
12+
1013
When executing longer-running commands, it may be helpful to show progress
1114
information, which updates as your command runs:
1215

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

2932
$progress->finish();
3033

34+
.. tip::
35+
36+
You can also set the current progress by calling the
37+
:method:`Symfony\\Component\\Console\\Helper\\ProgressHelper::setCurrent`
38+
method.
39+
3140
The appearance of the progress output can be customized as well, with a number
3241
of different levels of verbosity. Each of these displays different possible
3342
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
7079
if ($i % 100 == 0) {
7180
$progress->advance();
7281
}
73-
}
82+
}

0 commit comments

Comments
 (0)