Add iconv extension to suggested dependencies
This commit is contained in:
parent
e9e4c79894
commit
13f17079ef
@ -167,6 +167,9 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
|
||||
*/
|
||||
protected function utf8Encode($s)
|
||||
{
|
||||
if (!function_exists('iconv')) {
|
||||
throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.');
|
||||
}
|
||||
if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) {
|
||||
return $c;
|
||||
}
|
||||
|
@ -20,12 +20,14 @@
|
||||
"symfony/polyfill-mbstring": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-iconv": "*",
|
||||
"twig/twig": "~1.20|~2.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
|
||||
"ext-symfony_debug": ""
|
||||
},
|
||||
"autoload": {
|
||||
|
Reference in New Issue
Block a user