Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mbstring: Add iconv as requirement #456

Closed
wants to merge 2 commits into from
Closed

Conversation

shyim
Copy link

@shyim shyim commented Dec 24, 2023

The polyfill uses iconv to fake mbstring

PHP Fatal error:  Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in phar:///php-cs-fixer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php:116
Stack trace:
#0 phar:///php-cs-fixer.phar/vendor/symfony/polyfill-mbstring/bootstrap80.php(15): Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding()
#1 phar:///php-cs-fixer.phar/vendor/symfony/console/Application.php(1241): mb_convert_encoding()
#2 phar:///php-cs-fixer.phar/vendor/symfony/console/Application.php(869): Symfony\Component\Console\Application->splitStringByWidth()
#3 phar:///php-cs-fixer.phar/vendor/symfony/console/Application.php(840): Symfony\Component\Console\Application->doRenderThrowable()
#4 phar:///php-cs-fixer.phar/vendor/symfony/console/Application.php(154): Symfony\Component\Console\Application->renderThrowable()
#5 phar:///php-cs-fixer.phar/vendor/symfony/console/Application.php(177): Symfony\Component\Console\Application->Symfony\Component\Console\{closure}()
#6 /php-cs-fixer.phar(102): Symfony\Component\Console\Application->run()
#7 {main}
  thrown in phar:///php-cs-fixer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php on line 116

@derrabus
Copy link
Member

There's symfony/polyfill-iconv to fill that gap…

@nicolas-grekas
Copy link
Member

Closing as that would force installing the polyfill while the extension is available.
We made this on purpose because the iconv polyfill is heavy.

@stof
Copy link
Member

stof commented Jan 10, 2024

Given that the iconv polyfill provides ext-iconv (and we don't care about Composer 1.x anymore where providing an extension was working only half of the time), I think we should add a requirement on ext-iconv here (maybe once composer/composer#11669 is implemented).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants