Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7b06db8

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

File tree

Expand file treeCollapse file tree

1 file changed

+10
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-1
lines changed

‎components/console/helpers/progresshelper.rst

Copy file name to clipboardExpand all lines: components/console/helpers/progresshelper.rst
+10-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.