Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] Fix consoleProgressBar::override() after manualProgressBar::cleanup()#47998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4frommaxbeckers:patch-47987
Nov 11, 2022

Conversation

@maxbeckers
Copy link
Contributor

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#47987
LicenseMIT
Doc PR

In the issue#47987 is described, that there is a problem with overriding lines withProgressBar::override() on a multiline console output with manual call ofProgressBar::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"...

@carsonbotcarsonbot added this to the6.2 milestoneOct 26, 2022
@maxbeckersmaxbeckers changed the base branch from6.2 to5.4October 26, 2022 07:28
@maxbeckers
Copy link
ContributorAuthor

maxbeckers commentedOct 26, 2022
edited
Loading

Build failures are unrelated to the change.

Should be added to Milestone 5.4, had the wrong target branch when i created the PR.

@carsonbot
Copy link

Hey!

I think@CesarScur has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@maxbeckers
Copy link
ContributorAuthor

To reproduce i added a zip with the fix in vendor:
test-47998.zip
Just runphp testcommand.php in root.

Output without the fix:

Progress bar having only one line:Foo![----->----------------------]=-=-=-=Progress bar having two lines:[----->----------------------]Processing "foobar"...============================foobar

Output with the fix:

Progress bar having only one line:Foo![----->----------------------]=-=-=-=Progress bar having two lines:Foo![----->----------------------]Processing "foobar"...=-=-=-=============================foobar

@nicolas-grekasnicolas-grekas modified the milestones:6.2,5.4Nov 9, 2022
@fabpot
Copy link
Member

Thank you@maxbeckers.

@fabpotfabpot merged commit1d2e025 intosymfony:5.4Nov 11, 2022
@fabpotfabpot mentioned this pull requestNov 19, 2022
This was referencedNov 28, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

[Console] Progress bar clear/display remove too many lines

4 participants

@maxbeckers@carsonbot@fabpot@nicolas-grekas

[8]ページ先頭

©2009-2025 Movatter.jp