Symfony console ProgressBar component is not displayed in composer scripts

Using the ProgressBar component in a command called by a composer script has no effect as the ProgressBar output is not shown.

Why is this? Is there a way to enforce its rendering?


Update: Now (since upgrade to symfony 2.6) it is shown, but the console refresh doesn't work correctly and for each update is adds a new line...

Answers


Make sure that you're using a up-to-date version of the component. Check if the bar works correct with the following snippet:

<?php
$max=10;
$progress = new ProgressBar($output, $max);
$progress->start();

for ($i = 0; $i <= $max; ++$i) {
 sleep(1);
 $progress->advance();
}
$progress->finish();

If this is the case, the task you execute between every $progress->advance(); step seems to write something to output which makes the bar be redrawn on every step.


Need Your Help

Phonegap Android (Not showing google ad on android HD phones)

android jquery-mobile cordova adsense

I have created a phonegap app for ios and android,In my ios app google add showing perfect but it didn't show add in android HD Device .Below is my code which i have put in phonegap code google add...

Symfony 1.4: Check if form has errors inside form class

forms validation symfony1 symfony-1.4

Is there a simple way in Symfony 1.4 to know whether a submitted form had any errors inside the form class? I'm familiar with the $form['some_field']-&gt;hasErrors() for templates but in this case ...