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

Appearance settings

5.2.6 breaks progress bar when unicode characters are in message #40633

Copy link
Copy link
Closed
@grasmash

Description

@grasmash
Issue body actions

Symfony version(s) affected: 5.2.6

Description
5.2.6 included these changes to strlenWithoutDecoration() which break the progress bar when a unicode character is used as the progress bar character.

$progress->setProgressCharacter('💧');

How to reproduce
This test case reproduces the issue: https://github.com/acquia/cli/blob/master/tests/phpunit/src/Commands/Pull/PullDatabaseCommandTest.php#L294

The progress bar length is incorrectly calculated and results in an error:

str_repeat(): Second argument has to be greater than or equal to 0
/home/travis/build/acquia/cli/vendor/symfony/console/Helper/ProgressBar.php:517
/home/travis/build/acquia/cli/vendor/symfony/console/Helper/ProgressBar.php:576
/home/travis/build/acquia/cli/vendor/symfony/console/Helper/ProgressBar.php:589
/home/travis/build/acquia/cli/vendor/symfony/console/Helper/ProgressBar.php:414
/home/travis/build/acquia/cli/vendor/symfony/console/Helper/ProgressBar.php:323
/home/travis/build/acquia/cli/src/Output/Spinner/Spinner.php:151
/home/travis/build/acquia/cli/src/Output/Checklist.php:42
/home/travis/build/acquia/cli/tests/phpunit/src/Commands/ChecklistTest.php:28

Possible Solution

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.