composer update

This commit is contained in:
2020-12-06 10:28:55 +00:00
parent 69d92960d9
commit 09413522bb
1596 changed files with 60456 additions and 39587 deletions
+11 -7
View File
@@ -541,10 +541,14 @@ final class Iconv
$start += $slen;
}
if (0 > $start) {
return false;
if (\PHP_VERSION_ID < 80000) {
return false;
}
$start = 0;
}
if ($start >= $slen) {
return false;
return \PHP_VERSION_ID >= 80000 ? '' : false;
}
$rx = $slen - $start;
@@ -556,7 +560,7 @@ final class Iconv
return '';
}
if (0 > $length) {
return false;
return \PHP_VERSION_ID >= 80000 ? '' : false;
}
if ($length > $rx) {
@@ -619,10 +623,10 @@ final class Iconv
trigger_error(self::ERROR_ILLEGAL_CHARACTER);
return false;
} else {
$i += $ulen;
}
$i += $ulen;
$u[$j++] = $uchr[0];
isset($uchr[1]) && 0 !== ($u[$j++] = $uchr[1])
@@ -675,9 +679,9 @@ final class Iconv
if ($ignore && (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr)))) {
++$i;
continue;
} else {
$i += $ulen;
}
$i += $ulen;
}
if (isset($map[$uchr])) {
+23 -18
View File
@@ -1,6 +1,6 @@
<?php
static $data = array (
return array (
'µ' => 'μ',
'¼' => ' 1⁄4 ',
'½' => ' 1⁄2 ',
@@ -1393,13 +1393,13 @@ static $data = array (
'廓' => '廓',
'兀' => '兀',
'嗀' => '嗀',
'﨎' => '',
'﨏' => '',
'﨎' => '' . "\0" . '',
'﨏' => '' . "\0" . '',
'塚' => '塚',
'﨑' => '',
'﨑' => '' . "\0" . '',
'晴' => '晴',
'﨓' => '',
'﨔' => '',
'﨓' => '' . "\0" . '',
'﨔' => '' . "\0" . '',
'凞' => '凞',
'猪' => '猪',
'益' => '益',
@@ -1410,17 +1410,17 @@ static $data = array (
'靖' => '靖',
'精' => '精',
'羽' => '羽',
'﨟' => '',
'﨟' => '' . "\0" . '',
'蘒' => '蘒',
'﨡' => '',
'﨡' => '' . "\0" . '',
'諸' => '諸',
'﨣' => '',
'﨤' => '',
'﨣' => '' . "\0" . '',
'﨤' => '' . "\0" . '',
'逸' => '逸',
'都' => '都',
'﨧' => '',
'﨨' => '',
'﨩' => '',
'﨧' => '' . "\0" . '',
'﨨' => '' . "\0" . '',
'﨩' => '' . "\0" . '',
'飯' => '飯',
'飼' => '飼',
'館' => '館',
@@ -3146,6 +3146,16 @@ static $data = array (
'🉈' => '〔敗〕',
'🉐' => '(得)',
'🉑' => '(可)',
'🯰' => '0',
'🯱' => '1',
'🯲' => '2',
'🯳' => '3',
'🯴' => '4',
'🯵' => '5',
'🯶' => '6',
'🯷' => '7',
'🯸' => '8',
'🯹' => '9',
'丽' => '丽',
'丸' => '丸',
'乁' => '乁',
@@ -4091,8 +4101,3 @@ static $data = array (
'⦅' => '((',
'⦆' => '))',
);
$result =& $data;
unset($data);
return $result;
+19 -15
View File
@@ -11,6 +11,10 @@
use Symfony\Polyfill\Iconv as p;
if (extension_loaded('iconv')) {
return;
}
if (!defined('ICONV_IMPL')) {
define('ICONV_IMPL', 'Symfony');
}
@@ -25,56 +29,56 @@ if (!defined('ICONV_MIME_DECODE_CONTINUE_ON_ERROR')) {
}
if (!function_exists('iconv')) {
function iconv($from, $to, $s) { return p\Iconv::iconv($from, $to, $s); }
function iconv($from_encoding, $to_encoding, $string) { return p\Iconv::iconv($from_encoding, $to_encoding, $string); }
}
if (!function_exists('iconv_get_encoding')) {
function iconv_get_encoding($type = 'all') { return p\Iconv::iconv_get_encoding($type); }
}
if (!function_exists('iconv_set_encoding')) {
function iconv_set_encoding($type, $charset) { return p\Iconv::iconv_set_encoding($type, $charset); }
function iconv_set_encoding($type, $encoding) { return p\Iconv::iconv_set_encoding($type, $encoding); }
}
if (!function_exists('iconv_mime_encode')) {
function iconv_mime_encode($name, $value, $pref = null) { return p\Iconv::iconv_mime_encode($name, $value, $pref); }
function iconv_mime_encode($field_name, $field_value, $options = null) { return p\Iconv::iconv_mime_encode($field_name, $field_value, $options); }
}
if (!function_exists('iconv_mime_decode_headers')) {
function iconv_mime_decode_headers($encodedHeaders, $mode = 0, $enc = null) { return p\Iconv::iconv_mime_decode_headers($encodedHeaders, $mode, $enc); }
function iconv_mime_decode_headers($headers, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode_headers($headers, $mode, $encoding); }
}
if (extension_loaded('mbstring')) {
if (!function_exists('iconv_strlen')) {
function iconv_strlen($s, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_strlen($s, $enc); }
function iconv_strlen($string, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strlen($string, $encoding); }
}
if (!function_exists('iconv_strpos')) {
function iconv_strpos($s, $needle, $offset = 0, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_strpos($s, $needle, $offset, $enc); }
function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('iconv_strrpos')) {
function iconv_strrpos($s, $needle, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_strrpos($s, $needle, 0, $enc); }
function iconv_strrpos($haystack, $needle, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strrpos($haystack, $needle, 0, $encoding); }
}
if (!function_exists('iconv_substr')) {
function iconv_substr($s, $start, $length = 2147483647, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_substr($s, $start, $length, $enc); }
function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_substr($string, $offset, $length, $encoding); }
}
if (!function_exists('iconv_mime_decode')) {
function iconv_mime_decode($encodedHeaders, $mode = 0, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_decode_mimeheader($encodedHeaders, $mode, $enc); }
function iconv_mime_decode($string, $mode = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_decode_mimeheader($string, $mode, $encoding); }
}
} else {
if (!function_exists('iconv_strlen')) {
if (extension_loaded('xml')) {
function iconv_strlen($s, $enc = null) { return p\Iconv::strlen1($s, $enc); }
function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen1($string, $encoding); }
} else {
function iconv_strlen($s, $enc = null) { return p\Iconv::strlen2($s, $enc); }
function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen2($string, $encoding); }
}
}
if (!function_exists('iconv_strpos')) {
function iconv_strpos($s, $needle, $offset = 0, $enc = null) { return p\Iconv::iconv_strpos($s, $needle, $offset, $enc); }
function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Iconv::iconv_strpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('iconv_strrpos')) {
function iconv_strrpos($s, $needle, $enc = null) { return p\Iconv::iconv_strrpos($s, $needle, $enc); }
function iconv_strrpos($haystack, $needle, $encoding = null) { return p\Iconv::iconv_strrpos($haystack, $needle, $encoding); }
}
if (!function_exists('iconv_substr')) {
function iconv_substr($s, $start, $length = 2147483647, $enc = null) { return p\Iconv::iconv_substr($s, $start, $length, $enc); }
function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { return p\Iconv::iconv_substr($string, $offset, $length, $encoding); }
}
if (!function_exists('iconv_mime_decode')) {
function iconv_mime_decode($encodedHeaders, $mode = 0, $enc = null) { return p\Iconv::iconv_mime_decode($encodedHeaders, $mode, $enc); }
function iconv_mime_decode($string, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode($string, $mode, $encoding); }
}
}
+6 -2
View File
@@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Iconv\\": "" },
@@ -28,7 +28,11 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.16-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
}