You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #47998 [Console] Fix console ProgressBar::override() after manual ProgressBar::cleanup() (maxbeckers)
This PR was squashed before being merged into the 5.4 branch.
Discussion
----------
[Console] Fix console `ProgressBar::override()` after manual `ProgressBar::cleanup()`
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #47987
| License | MIT
| Doc PR |
In the issue #47987 is described, that there is a problem with overriding lines with `ProgressBar::override()` on a multiline console output with manual call of `ProgressBar::cleanup()`.
Testcode:
```
ProgressBar::setFormatDefinition('normal_nomax', "[%bar%]\n%message%");
$progressBar = new ProgressBar($output);
$progressBar->setMessage('Processing "foobar"...');
$progressBar->start();
$progressBar->clear();
$output->writeln('Foo!');
$progressBar->display();
$progressBar->finish();
```
Output before the fix:
```
Progress bar having only one line:
Foo!
[----->----------------------]
=-=-=-=
Progress bar having two lines:
[----->----------------------]
Processing "foobar"...
```
Expected output / output after the fix:
```
Progress bar having only one line:
Foo!
[----->----------------------]
=-=-=-=
Progress bar having two lines:
Foo!
[----->----------------------]
Processing "foobar"...
```
Commits
-------
aa661aa9ce [Console] Fix console `ProgressBar::override()` after manual `ProgressBar::cleanup()`
0 commit comments