Commit 005ed05
committed
bug #47998 [Console] Fix console
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()`ProgressBar::override() after manual ProgressBar::cleanup() (maxbeckers)2 files changed
+36
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
481 | 484 | | |
482 | 485 | | |
483 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
816 | | - | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
817 | 819 | | |
818 | 820 | | |
819 | 821 | | |
| |||
1124 | 1126 | | |
1125 | 1127 | | |
1126 | 1128 | | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
1127 | 1154 | | |
0 commit comments