Closed
Description
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