merge master in prod

This commit is contained in:
2020-09-08 12:00:45 +02:00
parent b925edaa9e
commit 3e5e731c2c
226 changed files with 8516 additions and 4149 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2015-2018 Fabien Potencier
Copyright (c) 2015-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+2 -2
View File
@@ -2,8 +2,8 @@ Symfony Polyfill / Iconv
========================
This component provides a native PHP implementation of the
[php.net/iconv](http://php.net/iconv) functions
(short of [`ob_iconv_handler`](http://php.net/manual/en/function.ob-iconv-handler.php)).
[php.net/iconv](https://php.net/iconv) functions
(short of [`ob_iconv_handler`](https://php.net/ob-iconv-handler)).
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
@@ -866,6 +866,7 @@ static $data = array (
'㋼' => '(ヰ)',
'㋽' => '(ヱ)',
'㋾' => '(ヲ)',
'㋿' => '令和',
'㌀' => 'アパート',
'㌁' => 'アルファ',
'㌂' => 'アンペア',
@@ -3133,6 +3134,7 @@ static $data = array (
'🈸' => '申',
'🈹' => '割',
'🈺' => '営',
'🈻' => '配',
'🉀' => '〔本〕',
'🉁' => '〔三〕',
'🉂' => '〔二〕',
@@ -3878,6 +3880,104 @@ static $data = array (
'ỽ' => 'v',
'Ỿ' => 'Y',
'ỿ' => 'y',
'Ⱡ' => 'L',
'ⱡ' => 'l',
'Ɫ' => 'L',
'Ᵽ' => 'P',
'Ɽ' => 'R',
'ⱥ' => 'a',
'ⱦ' => 't',
'Ⱨ' => 'H',
'ⱨ' => 'h',
'Ⱪ' => 'K',
'ⱪ' => 'k',
'Ⱬ' => 'Z',
'ⱬ' => 'z',
'Ɱ' => 'M',
'ⱱ' => 'v',
'Ⱳ' => 'W',
'ⱳ' => 'w',
'ⱴ' => 'v',
'ⱸ' => 'e',
'ⱺ' => 'o',
'Ȿ' => 'S',
'Ɀ' => 'Z',
'ꜰ' => 'F',
'' => 'S',
'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
'₠' => 'CE',
@@ -3887,8 +3987,28 @@ static $data = array (
'₧' => 'Pts',
'₺' => 'TL',
'₹' => 'Rs',
'℗' => '(P)',
'℘' => 'P',
'℞' => 'Rx',
'' => '0',
' ' => ' ',
'' => ' ',
'' => ' ',
'' => ' ',
'' => ' ',
'' => ' ',
'' => ' ',
'' => ' ',
'' => ' ',
'' => ' ',
'' => ' ',
'ʹ' => '\'',
'ʺ' => '"',
'ʻ' => '\'',
'ʼ' => '\'',
'ʽ' => '\'',
'ˈ' => '\'',
'ˋ' => '`',
'' => '\'',
'' => '\'',
'' => ',',
@@ -3904,6 +4024,7 @@ static $data = array (
'»' => '>>',
'' => '<',
'' => '>',
'­' => '-',
'' => '-',
'' => '-',
'' => '-',
@@ -3912,6 +4033,12 @@ static $data = array (
'―' => '-',
'︱' => '-',
'︲' => '-',
'˂' => '<',
'˃' => '>',
'˄' => '^',
'ˆ' => '^',
'ː' => ':',
'˜' => '~',
'‖' => '||',
'' => '/',
'⁅' => '[',
@@ -3952,6 +4079,8 @@ static $data = array (
'﹈' => ']',
'×' => '*',
'÷' => '/',
'˖' => '+',
'˗' => '-',
'' => '-',
'' => '/',
'' => '\\',
@@ -11,12 +11,14 @@
use Symfony\Polyfill\Iconv as p;
if (!function_exists('iconv')) {
if (!defined('ICONV_IMPL')) {
define('ICONV_IMPL', 'Symfony');
define('ICONV_VERSION', '1.0');
define('ICONV_MIME_DECODE_STRICT', 1);
define('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2);
}
if (!function_exists('iconv')) {
function iconv($from, $to, $s) { return p\Iconv::iconv($from, $to, $s); }
function iconv_get_encoding($type = 'all') { return p\Iconv::iconv_get_encoding($type); }
function iconv_set_encoding($type, $charset) { return p\Iconv::iconv_set_encoding($type, $charset); }
@@ -28,7 +28,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
"dev-master": "1.15-dev"
}
}
}
@@ -43,6 +43,9 @@ namespace Symfony\Polyfill\Intl\Idn;
*/
final class Idn
{
const INTL_IDNA_VARIANT_2003 = 0;
const INTL_IDNA_VARIANT_UTS46 = 1;
private static $encodeTable = array(
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
@@ -60,18 +63,18 @@ final class Idn
public static function idn_to_ascii($domain, $options, $variant, &$idna_info = array())
{
if (\PHP_VERSION_ID >= 70200 && INTL_IDNA_VARIANT_2003 === $variant) {
if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
@trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED);
}
if (INTL_IDNA_VARIANT_UTS46 === $variant) {
if (self::INTL_IDNA_VARIANT_UTS46 === $variant) {
$domain = mb_strtolower($domain, 'utf-8');
}
$parts = explode('.', $domain);
foreach ($parts as &$part) {
if ('' === $part) {
foreach ($parts as $i => &$part) {
if ('' === $part && \count($parts) > 1 + $i) {
return false;
}
if (false === $part = self::encodePart($part)) {
@@ -92,7 +95,7 @@ final class Idn
public static function idn_to_utf8($domain, $options, $variant, &$idna_info = array())
{
if (\PHP_VERSION_ID >= 70200 && INTL_IDNA_VARIANT_2003 === $variant) {
if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
@trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED);
}
@@ -1,4 +1,4 @@
Copyright (c) 2018 Fabien Potencier
Copyright (c) 2018-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
Symfony Polyfill / Intl: Idn
============================
This component provides `idn_to_ascii` and `idn_to_utf8` functions to users who run php versions without the intl extension.
This component provides [`idn_to_ascii`](https://php.net/idn-to-ascii) and [`idn_to_utf8`](https://php.net/idn-to-utf8) functions to users who run php versions without the [Intl](https://php.net/intl) extension.
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
@@ -11,7 +11,7 @@
use Symfony\Polyfill\Intl\Idn as p;
if (!function_exists('idn_to_ascii')) {
if (!defined('IDNA_DEFAULT')) {
define('U_IDNA_PROHIBITED_ERROR', 66560);
define('U_IDNA_ERROR_START', 66560);
define('U_IDNA_UNASSIGNED_ERROR', 66561);
@@ -48,7 +48,9 @@ if (!function_exists('idn_to_ascii')) {
define('IDNA_ERROR_INVALID_ACE_LABEL', 1024);
define('IDNA_ERROR_BIDI', 2048);
define('IDNA_ERROR_CONTEXTJ', 4096);
}
if (!function_exists('idn_to_ascii')) {
if (PHP_VERSION_ID < 70400) {
function idn_to_ascii($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array()) { return p\Idn::idn_to_ascii($domain, $options, $variant, $idna_info); }
function idn_to_utf8($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array()) { return p\Idn::idn_to_utf8($domain, $options, $variant, $idna_info); }
@@ -18,7 +18,7 @@
"require": {
"php": ">=5.3.3",
"symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php72": "^1.9"
"symfony/polyfill-php72": "^1.10"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" },
@@ -30,7 +30,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
"dev-master": "1.15-dev"
}
}
}
@@ -1,4 +1,4 @@
Copyright (c) 2015-2018 Fabien Potencier
Copyright (c) 2015-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,6 +35,7 @@ namespace Symfony\Polyfill\Mbstring;
* - mb_strlen - Get string length
* - mb_strpos - Find position of first occurrence of string in a string
* - mb_strrpos - Find position of last occurrence of a string in a string
* - mb_str_split - Convert a string to an array
* - mb_strtolower - Make a string lowercase
* - mb_strtoupper - Make a string uppercase
* - mb_substitute_character - Set/Get substitution character
@@ -511,7 +512,9 @@ final class Mbstring
$offset = 0;
} elseif ($offset = (int) $offset) {
if ($offset < 0) {
$haystack = self::mb_substr($haystack, 0, $offset, $encoding);
if (0 > $offset += self::mb_strlen($needle)) {
$haystack = self::mb_substr($haystack, 0, $offset, $encoding);
}
$offset = 0;
} else {
$haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
@@ -523,6 +526,45 @@ final class Mbstring
return false !== $pos ? $offset + $pos : false;
}
public static function mb_str_split($string, $split_length = 1, $encoding = null)
{
if (null !== $string && !\is_scalar($string) && !(\is_object($string) && \method_exists($string, '__toString'))) {
trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', E_USER_WARNING);
return null;
}
if (1 > $split_length = (int) $split_length) {
trigger_error('The length of each segment must be greater than zero', E_USER_WARNING);
return false;
}
if (null === $encoding) {
$encoding = mb_internal_encoding();
}
if ('UTF-8' === $encoding = self::getEncoding($encoding)) {
$rx = '/(';
while (65535 < $split_length) {
$rx .= '.{65535}';
$split_length -= 65535;
}
$rx .= '.{'.$split_length.'})/us';
return preg_split($rx, $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
}
$result = array();
$length = mb_strlen($string, $encoding);
for ($i = 0; $i < $length; $i += $split_length) {
$result[] = mb_substr($string, $i, $split_length, $encoding);
}
return $result;
}
public static function mb_strtolower($s, $encoding = null)
{
return self::mb_convert_case($s, MB_CASE_LOWER, $encoding);
@@ -546,7 +588,7 @@ final class Mbstring
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
return substr($s, $start, null === $length ? 2147483647 : $length);
return (string) substr($s, $start, null === $length ? 2147483647 : $length);
}
if ($start < 0) {
@@ -786,11 +828,16 @@ final class Mbstring
return self::$internalEncoding;
}
if ('UTF-8' === $encoding) {
return 'UTF-8';
}
$encoding = strtoupper($encoding);
if ('8BIT' === $encoding || 'BINARY' === $encoding) {
return 'CP850';
}
if ('UTF8' === $encoding) {
return 'UTF-8';
}
@@ -2,7 +2,7 @@ Symfony Polyfill / Mbstring
===========================
This component provides a partial, native PHP implementation for the
[Mbstring](http://php.net/mbstring) extension.
[Mbstring](https://php.net/mbstring) extension.
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
@@ -11,11 +11,13 @@
use Symfony\Polyfill\Mbstring as p;
if (!function_exists('mb_strlen')) {
if (!defined('MB_CASE_UPPER')) {
define('MB_CASE_UPPER', 0);
define('MB_CASE_LOWER', 1);
define('MB_CASE_TITLE', 2);
}
if (!function_exists('mb_strlen')) {
function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
@@ -56,3 +58,7 @@ if (!function_exists('mb_chr')) {
function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); }
function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
}
if (!function_exists('mb_str_split')) {
function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); }
}
@@ -28,7 +28,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
"dev-master": "1.15-dev"
}
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2015-2018 Fabien Potencier
Copyright (c) 2015-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+1 -1
View File
@@ -16,7 +16,7 @@ Moved to core since 7.2 (was in the optional XML extension earlier):
- [`utf8_decode`](https://php.net/utf8_decode)
Also, it provides a constant added to PHP 7.2:
- [`PHP_OS_FAMILY`](http://php.net/manual/en/reserved.constants.php#constant.php-os-family)
- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family)
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
@@ -25,7 +25,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
"dev-master": "1.15-dev"
}
}
}