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 0e45e29

Browse filesBrowse files
committed
feature #4655 Document new progressbar methods (javiereguiluz)
This PR was merged into the 2.6 branch. Discussion ---------- Document new progressbar methods | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.6+ | Fixed tickets | #4593 Commits ------- 6a3cbd9 Changed the "new in Symfony 2.6" message for consistency 2b86d80 Documented getProgress/setProgress methods
2 parents 921f3cd + 6a3cbd9 commit 0e45e29
Copy full SHA for 0e45e29

File tree

Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed

‎components/console/helpers/progressbar.rst

Copy file name to clipboardExpand all lines: components/console/helpers/progressbar.rst
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ number of units, and advance the progress as the command executes::
4242
Instead of advancing the bar by a number of steps (with the
4343
:method:`Symfony\\Component\\Console\\Helper\\ProgressBar::advance` method),
4444
you can also set the current progress by calling the
45-
:method:`Symfony\\Component\\Console\\Helper\\ProgressBar::setCurrent` method.
45+
:method:`Symfony\\Component\\Console\\Helper\\ProgressBar::setProgress` method.
46+
47+
.. versionadded:: 2.6
48+
The ``setProgress()`` method was called ``setCurrent()`` prior to Symfony 2.6.
4649

4750
.. caution::
4851

@@ -300,10 +303,13 @@ that displays the number of remaining steps::
300303
ProgressBar::setPlaceholderFormatterDefinition(
301304
'remaining_steps',
302305
function (ProgressBar $bar, OutputInterface $output) {
303-
return $bar->getMaxSteps() - $bar->getStep();
306+
return $bar->getMaxSteps() - $bar->getProgress();
304307
}
305308
);
306309

310+
.. versionadded:: 2.6
311+
The ``getProgress()`` method was called ``getStep()`` prior to Symfony 2.6.
312+
307313
Custom Messages
308314
~~~~~~~~~~~~~~~
309315

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.