File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
components/console/helpers Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,22 @@ Instead of advancing the bar by a number of steps (with the
46
46
you can also set the current progress by calling the
47
47
:method: `Symfony\\ Component\\ Console\\ Helper\\ ProgressBar::setProgress ` method.
48
48
49
+ If you are resuming long-standing tasks, it's useful to start drawing the progress
50
+ bar at a certain point. Use the second optional argument of ``start() `` to set
51
+ that starting point::
52
+
53
+ use Symfony\Component\Console\Helper\ProgressBar;
54
+
55
+ // creates a new progress bar (100 units)
56
+ $progressBar = new ProgressBar($output, 100);
57
+
58
+ // displays the progress bar starting at 25 completed units
59
+ $progressBar->start(null, 25);
60
+
61
+ .. versionadded :: 6.2
62
+
63
+ The option to start a progress bar at a certain point was introduced in Symfony 6.2.
64
+
49
65
.. tip ::
50
66
51
67
If your platform doesn't support ANSI codes, updates to the progress
You can’t perform that action at this time.
0 commit comments