symfony/symfony — pull request #9420 by giosh94mhz (2013-10-31 09:47:57+00:00)
Title: [Console][ProgressHelper] Fix ProgressHelper redraw when redrawFreq is greater than 1

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |

When using a ProgressHelper object with redrawFreq > 1, there are situation where redraw may never occur.
E.g.

redrawFreq = 2
setContent = 1
advance(2) ... the redraw event is detected by 0 == current % redrawFreq.

I've tested the patch against phpunit and my local environment.

Maybe, a new test can be implemented to avoid the previous example, but I'm not familiar with mock object... :)