Skip to content

Commit 99932cf

Browse files
committed
bug #4010 [Console] Fixed documentation for ProgressBar (VasekPurchart)
This PR was merged into the 2.5 branch. Discussion ---------- [Console] Fixed documentation for ProgressBar This place is using the old ProgressHelper API and can be confusing when migrating. | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.5+ | Fixed tickets | no Commits ------- 4bc00df Fixed documentation for ProgressBar
2 parents 12752c1 + 4bc00df commit 99932cf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/console/helpers/progressbar.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,11 @@ to display it can be customized::
265265
For performance reasons, be careful if you set the total number of steps
266266
to a high number. For example, if you're iterating over a large number of
267267
items, consider setting the redraw frequency to a higher value by calling
268-
:method:`Symfony\\Component\\Console\\Helper\\ProgressHelper::setRedrawFrequency`,
268+
:method:`Symfony\\Component\\Console\\Helper\\ProgressBar::setRedrawFrequency`,
269269
so it updates on only some iterations::
270270

271-
$progress->start($output, 50000);
271+
$progress = new ProgressBar($output, 50000);
272+
$progress->start();
272273

273274
// update every 100 iterations
274275
$progress->setRedrawFrequency(100);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy