Skip to content

Commit

Permalink
bug #4010 [Console] Fixed documentation for ProgressBar (VasekPurchart)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
weaverryan committed Jul 25, 2014
2 parents 12752c1 + 4bc00df commit 99932cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/console/helpers/progressbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,11 @@ to display it can be customized::
For performance reasons, be careful if you set the total number of steps
to a high number. For example, if you're iterating over a large number of
items, consider setting the redraw frequency to a higher value by calling
:method:`Symfony\\Component\\Console\\Helper\\ProgressHelper::setRedrawFrequency`,
:method:`Symfony\\Component\\Console\\Helper\\ProgressBar::setRedrawFrequency`,
so it updates on only some iterations::

$progress->start($output, 50000);
$progress = new ProgressBar($output, 50000);
$progress->start();

// update every 100 iterations
$progress->setRedrawFrequency(100);
Expand Down

0 comments on commit 99932cf

Please sign in to comment.