Closed
Description
Symfony version(s) affected: 5.3.4
Description
Multiline progress bar formats are not cleared during overwrite so old message parts may remain.
How to reproduce
// Command class
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('START TEST');
$bar = new ProgressBar($output, 2);
$bar->setFormat("[%bar%]\n%message%");
$bar->setMessage('123456790');
$bar->advance();
$bar->display();
$bar->setMessage('ABC');
$bar->advance();
$bar->display();
$bar->finish();
$output->writeln('');
$output->writeln('END TEST');
return 0;
}
Possible Solution
PR to be linked shortly.