symfony/symfony — pull request #5735 by pborreli (2012-10-12 23:26:29+00:00)
Title: [Console] [ProgressHelper] better percentage precision

With this code :
```php
$progress = new ProgressHelper();
$progress->start($output, 50);
$progress->display();
$progress->advance();
$progress->advance();
$progress->advance();
$progress->advance();
$progress->advance();
$progress->advance();
```
The output was :
```
0/50 [>---------------------------] 0% // float(0)
1/50 [>---------------------------] 0% // float(0)
2/50 [>---------------------------] 0% // float(0)
3/50 [==>-------------------------] 10% // float(0.1)
4/50 [==>-------------------------] 10% // float(0.1)
5/50 [==>-------------------------] 10% // float(0.1)
6/50 [==>-------------------------] 10% // float(0.1)
```
With this PR :
```
0/50 [>---------------------------] 0% // float(0)
1/50 [>---------------------------] 2% // float(0.02)
2/50 [=>--------------------------] 4% // float(0.04)
3/50 [=>--------------------------] 6% // float(0.06)
4/50 [==>-------------------------] 8% // float(0.08)
5/50 [==>-------------------------] 10% // float(0.1)
6/50 [===>------------------------] 12% // float(0.12)
```
Tests are included.