提交的内容
This commit is contained in:
0
vendor/symfony/polyfill-ctype/Ctype.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-ctype/Ctype.php
vendored
Executable file → Normal file
2
vendor/symfony/polyfill-ctype/LICENSE
vendored
Executable file → Normal file
2
vendor/symfony/polyfill-ctype/LICENSE
vendored
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2018-2019 Fabien Potencier
|
||||
Copyright (c) 2018-present 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
|
||||
|
||||
0
vendor/symfony/polyfill-ctype/README.md
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-ctype/README.md
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-ctype/bootstrap.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-ctype/bootstrap.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-ctype/bootstrap80.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-ctype/bootstrap80.php
vendored
Executable file → Normal file
5
vendor/symfony/polyfill-ctype/composer.json
vendored
Executable file → Normal file
5
vendor/symfony/polyfill-ctype/composer.json
vendored
Executable file → Normal file
@ -16,7 +16,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"provide": {
|
||||
"ext-ctype": "*"
|
||||
@ -30,9 +30,6 @@
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
|
||||
60
vendor/symfony/polyfill-intl-idn/Idn.php
vendored
Executable file → Normal file
60
vendor/symfony/polyfill-intl-idn/Idn.php
vendored
Executable file → Normal file
@ -11,8 +11,6 @@
|
||||
|
||||
namespace Symfony\Polyfill\Intl\Idn;
|
||||
|
||||
use Exception;
|
||||
use Normalizer;
|
||||
use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges;
|
||||
use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex;
|
||||
|
||||
@ -147,7 +145,11 @@ final class Idn
|
||||
*/
|
||||
public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = [])
|
||||
{
|
||||
if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
|
||||
if (\PHP_VERSION_ID > 80400 && '' === $domainName) {
|
||||
throw new \ValueError('idn_to_ascii(): Argument #1 ($domain) cannot be empty');
|
||||
}
|
||||
|
||||
if (self::INTL_IDNA_VARIANT_2003 === $variant) {
|
||||
@trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
@ -167,7 +169,7 @@ final class Idn
|
||||
if (1 === preg_match('/[^\x00-\x7F]/', $label)) {
|
||||
try {
|
||||
$label = 'xn--'.self::punycodeEncode($label);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$info->errors |= self::ERROR_PUNYCODE;
|
||||
}
|
||||
|
||||
@ -200,7 +202,11 @@ final class Idn
|
||||
*/
|
||||
public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = [])
|
||||
{
|
||||
if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
|
||||
if (\PHP_VERSION_ID > 80400 && '' === $domainName) {
|
||||
throw new \ValueError('idn_to_utf8(): Argument #1 ($domain) cannot be empty');
|
||||
}
|
||||
|
||||
if (self::INTL_IDNA_VARIANT_2003 === $variant) {
|
||||
@trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
@ -282,10 +288,6 @@ final class Idn
|
||||
|
||||
switch ($data['status']) {
|
||||
case 'disallowed':
|
||||
$info->errors |= self::ERROR_DISALLOWED;
|
||||
|
||||
// no break.
|
||||
|
||||
case 'valid':
|
||||
$str .= mb_chr($codePoint, 'utf-8');
|
||||
|
||||
@ -296,7 +298,7 @@ final class Idn
|
||||
break;
|
||||
|
||||
case 'mapped':
|
||||
$str .= $data['mapping'];
|
||||
$str .= $transitional && 0x1E9E === $codePoint ? 'ss' : $data['mapping'];
|
||||
|
||||
break;
|
||||
|
||||
@ -335,8 +337,8 @@ final class Idn
|
||||
$domain = self::mapCodePoints($domain, $options, $info);
|
||||
|
||||
// Step 2. Normalize the domain name string to Unicode Normalization Form C.
|
||||
if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) {
|
||||
$domain = Normalizer::normalize($domain, Normalizer::FORM_C);
|
||||
if (!\Normalizer::isNormalized($domain, \Normalizer::FORM_C)) {
|
||||
$domain = \Normalizer::normalize($domain, \Normalizer::FORM_C);
|
||||
}
|
||||
|
||||
// Step 3. Break the string into labels at U+002E (.) FULL STOP.
|
||||
@ -348,9 +350,21 @@ final class Idn
|
||||
$validationOptions = $options;
|
||||
|
||||
if ('xn--' === substr($label, 0, 4)) {
|
||||
// Step 4.1. If the label contains any non-ASCII code point (i.e., a code point greater than U+007F),
|
||||
// record that there was an error, and continue with the next label.
|
||||
if (preg_match('/[^\x00-\x7F]/', $label)) {
|
||||
$info->errors |= self::ERROR_PUNYCODE;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Step 4.2. Attempt to convert the rest of the label to Unicode according to Punycode [RFC3492]. If
|
||||
// that conversion fails, record that there was an error, and continue
|
||||
// with the next label. Otherwise replace the original label in the string by the results of the
|
||||
// conversion.
|
||||
try {
|
||||
$label = self::punycodeDecode(substr($label, 4));
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$info->errors |= self::ERROR_PUNYCODE;
|
||||
|
||||
continue;
|
||||
@ -496,7 +510,7 @@ final class Idn
|
||||
}
|
||||
|
||||
// Step 1. The label must be in Unicode Normalization Form C.
|
||||
if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) {
|
||||
if (!\Normalizer::isNormalized($label, \Normalizer::FORM_C)) {
|
||||
$info->errors |= self::ERROR_INVALID_ACE_LABEL;
|
||||
}
|
||||
|
||||
@ -518,6 +532,8 @@ final class Idn
|
||||
if ('-' === substr($label, -1, 1)) {
|
||||
$info->errors |= self::ERROR_TRAILING_HYPHEN;
|
||||
}
|
||||
} elseif ('xn--' === substr($label, 0, 4)) {
|
||||
$info->errors |= self::ERROR_PUNYCODE;
|
||||
}
|
||||
|
||||
// Step 4. The label must not contain a U+002E (.) FULL STOP.
|
||||
@ -583,7 +599,7 @@ final class Idn
|
||||
|
||||
for ($j = 0; $j < $b; ++$j) {
|
||||
if ($bytes[$j] > 0x7F) {
|
||||
throw new Exception('Invalid input');
|
||||
throw new \Exception('Invalid input');
|
||||
}
|
||||
|
||||
$output[$out++] = $input[$j];
|
||||
@ -599,17 +615,17 @@ final class Idn
|
||||
|
||||
for ($k = self::BASE; /* no condition */; $k += self::BASE) {
|
||||
if ($in >= $inputLength) {
|
||||
throw new Exception('Invalid input');
|
||||
throw new \Exception('Invalid input');
|
||||
}
|
||||
|
||||
$digit = self::$basicToDigit[$bytes[$in++] & 0xFF];
|
||||
|
||||
if ($digit < 0) {
|
||||
throw new Exception('Invalid input');
|
||||
throw new \Exception('Invalid input');
|
||||
}
|
||||
|
||||
if ($digit > intdiv(self::MAX_INT - $i, $w)) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
$i += $digit * $w;
|
||||
@ -629,7 +645,7 @@ final class Idn
|
||||
$baseMinusT = self::BASE - $t;
|
||||
|
||||
if ($w > intdiv(self::MAX_INT, $baseMinusT)) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
$w *= $baseMinusT;
|
||||
@ -639,7 +655,7 @@ final class Idn
|
||||
$bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi);
|
||||
|
||||
if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
$n += intdiv($i, $outPlusOne);
|
||||
@ -694,7 +710,7 @@ final class Idn
|
||||
}
|
||||
|
||||
if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
$delta += ($m - $n) * ($h + 1);
|
||||
@ -702,7 +718,7 @@ final class Idn
|
||||
|
||||
foreach ($iter as $codePoint) {
|
||||
if ($codePoint < $n && 0 === ++$delta) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
if ($codePoint === $n) {
|
||||
|
||||
0
vendor/symfony/polyfill-intl-idn/Info.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Info.php
vendored
Executable file → Normal file
2
vendor/symfony/polyfill-intl-idn/LICENSE
vendored
Executable file → Normal file
2
vendor/symfony/polyfill-intl-idn/LICENSE
vendored
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham <trevor.rowbotham@pm.me>
|
||||
Copyright (c) 2018-present Fabien Potencier and Trevor Rowbotham <trevor.rowbotham@pm.me>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
0
vendor/symfony/polyfill-intl-idn/README.md
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/README.md
vendored
Executable file → Normal file
9
vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php
vendored
Executable file → Normal file
9
vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php
vendored
Executable file → Normal file
@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Polyfill\Intl\Idn\Resources\unidata;
|
||||
|
||||
/**
|
||||
|
||||
9
vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php
vendored
Executable file → Normal file
9
vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php
vendored
Executable file → Normal file
@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Polyfill\Intl\Idn\Resources\unidata;
|
||||
|
||||
/**
|
||||
|
||||
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/bootstrap.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/bootstrap.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/bootstrap80.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-idn/bootstrap80.php
vendored
Executable file → Normal file
8
vendor/symfony/polyfill-intl-idn/composer.json
vendored
Executable file → Normal file
8
vendor/symfony/polyfill-intl-idn/composer.json
vendored
Executable file → Normal file
@ -20,9 +20,8 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"symfony/polyfill-intl-normalizer": "^1.10",
|
||||
"symfony/polyfill-php72": "^1.10"
|
||||
"php": ">=7.2",
|
||||
"symfony/polyfill-intl-normalizer": "^1.10"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" },
|
||||
@ -33,9 +32,6 @@
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
|
||||
2
vendor/symfony/polyfill-intl-normalizer/LICENSE
vendored
Executable file → Normal file
2
vendor/symfony/polyfill-intl-normalizer/LICENSE
vendored
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2019 Fabien Potencier
|
||||
Copyright (c) 2015-present 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
|
||||
|
||||
0
vendor/symfony/polyfill-intl-normalizer/Normalizer.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Normalizer.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/README.md
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/README.md
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalComposition.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalComposition.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/bootstrap.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/bootstrap.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/bootstrap80.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-intl-normalizer/bootstrap80.php
vendored
Executable file → Normal file
5
vendor/symfony/polyfill-intl-normalizer/composer.json
vendored
Executable file → Normal file
5
vendor/symfony/polyfill-intl-normalizer/composer.json
vendored
Executable file → Normal file
@ -16,7 +16,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" },
|
||||
@ -28,9 +28,6 @@
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
|
||||
2
vendor/symfony/polyfill-mbstring/LICENSE
vendored
Executable file → Normal file
2
vendor/symfony/polyfill-mbstring/LICENSE
vendored
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2019 Fabien Potencier
|
||||
Copyright (c) 2015-present 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
|
||||
|
||||
185
vendor/symfony/polyfill-mbstring/Mbstring.php
vendored
Executable file → Normal file
185
vendor/symfony/polyfill-mbstring/Mbstring.php
vendored
Executable file → Normal file
@ -48,6 +48,11 @@ namespace Symfony\Polyfill\Mbstring;
|
||||
* - mb_strstr - Finds first occurrence of a string within another
|
||||
* - mb_strwidth - Return width of string
|
||||
* - mb_substr_count - Count the number of substring occurrences
|
||||
* - mb_ucfirst - Make a string's first character uppercase
|
||||
* - mb_lcfirst - Make a string's first character lowercase
|
||||
* - mb_trim - Strip whitespace (or other characters) from the beginning and end of a string
|
||||
* - mb_ltrim - Strip whitespace (or other characters) from the beginning of a string
|
||||
* - mb_rtrim - Strip whitespace (or other characters) from the end of a string
|
||||
*
|
||||
* Not implemented:
|
||||
* - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
|
||||
@ -69,7 +74,7 @@ final class Mbstring
|
||||
{
|
||||
public const MB_CASE_FOLD = \PHP_INT_MAX;
|
||||
|
||||
private const CASE_FOLD = [
|
||||
private const SIMPLE_CASE_FOLD = [
|
||||
['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
|
||||
['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
|
||||
];
|
||||
@ -80,6 +85,15 @@ final class Mbstring
|
||||
|
||||
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
|
||||
{
|
||||
if (\is_array($s)) {
|
||||
$r = [];
|
||||
foreach ($s as $str) {
|
||||
$r[] = self::mb_convert_encoding($str, $toEncoding, $fromEncoding);
|
||||
}
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
if (\is_array($fromEncoding) || (null !== $fromEncoding && false !== strpos($fromEncoding, ','))) {
|
||||
$fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
|
||||
} else {
|
||||
@ -301,7 +315,11 @@ final class Mbstring
|
||||
$map = $upper;
|
||||
} else {
|
||||
if (self::MB_CASE_FOLD === $mode) {
|
||||
$s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
|
||||
static $caseFolding = null;
|
||||
if (null === $caseFolding) {
|
||||
$caseFolding = self::getData('caseFolding');
|
||||
}
|
||||
$s = strtr($s, $caseFolding);
|
||||
}
|
||||
|
||||
static $lower = null;
|
||||
@ -413,7 +431,20 @@ final class Mbstring
|
||||
$encoding = self::$internalEncoding;
|
||||
}
|
||||
|
||||
return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
|
||||
if (!\is_array($var)) {
|
||||
return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
|
||||
}
|
||||
|
||||
foreach ($var as $key => $value) {
|
||||
if (!self::mb_check_encoding($key, $encoding)) {
|
||||
return false;
|
||||
}
|
||||
if (!self::mb_check_encoding($value, $encoding)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
|
||||
@ -638,8 +669,10 @@ final class Mbstring
|
||||
|
||||
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
|
||||
{
|
||||
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
|
||||
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
|
||||
[$haystack, $needle] = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [
|
||||
self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding),
|
||||
self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding),
|
||||
]);
|
||||
|
||||
return self::mb_strpos($haystack, $needle, $offset, $encoding);
|
||||
}
|
||||
@ -674,8 +707,11 @@ final class Mbstring
|
||||
|
||||
public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
|
||||
{
|
||||
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
|
||||
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
|
||||
$haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding);
|
||||
$needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding);
|
||||
|
||||
$haystack = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack);
|
||||
$needle = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle);
|
||||
|
||||
return self::mb_strrpos($haystack, $needle, $offset, $encoding);
|
||||
}
|
||||
@ -798,6 +834,69 @@ final class Mbstring
|
||||
return $code;
|
||||
}
|
||||
|
||||
public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, ?string $encoding = null): string
|
||||
{
|
||||
if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) {
|
||||
throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH');
|
||||
}
|
||||
|
||||
if (null === $encoding) {
|
||||
$encoding = self::mb_internal_encoding();
|
||||
} else {
|
||||
self::assertEncoding($encoding, 'mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given');
|
||||
}
|
||||
|
||||
if (self::mb_strlen($pad_string, $encoding) <= 0) {
|
||||
throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string');
|
||||
}
|
||||
|
||||
$paddingRequired = $length - self::mb_strlen($string, $encoding);
|
||||
|
||||
if ($paddingRequired < 1) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
switch ($pad_type) {
|
||||
case \STR_PAD_LEFT:
|
||||
return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string;
|
||||
case \STR_PAD_RIGHT:
|
||||
return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding);
|
||||
default:
|
||||
$leftPaddingLength = floor($paddingRequired / 2);
|
||||
$rightPaddingLength = $paddingRequired - $leftPaddingLength;
|
||||
|
||||
return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding);
|
||||
}
|
||||
}
|
||||
|
||||
public static function mb_ucfirst(string $string, ?string $encoding = null): string
|
||||
{
|
||||
if (null === $encoding) {
|
||||
$encoding = self::mb_internal_encoding();
|
||||
} else {
|
||||
self::assertEncoding($encoding, 'mb_ucfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given');
|
||||
}
|
||||
|
||||
$firstChar = mb_substr($string, 0, 1, $encoding);
|
||||
$firstChar = mb_convert_case($firstChar, \MB_CASE_TITLE, $encoding);
|
||||
|
||||
return $firstChar.mb_substr($string, 1, null, $encoding);
|
||||
}
|
||||
|
||||
public static function mb_lcfirst(string $string, ?string $encoding = null): string
|
||||
{
|
||||
if (null === $encoding) {
|
||||
$encoding = self::mb_internal_encoding();
|
||||
} else {
|
||||
self::assertEncoding($encoding, 'mb_lcfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given');
|
||||
}
|
||||
|
||||
$firstChar = mb_substr($string, 0, 1, $encoding);
|
||||
$firstChar = mb_convert_case($firstChar, \MB_CASE_LOWER, $encoding);
|
||||
|
||||
return $firstChar.mb_substr($string, 1, null, $encoding);
|
||||
}
|
||||
|
||||
private static function getSubpart($pos, $part, $haystack, $encoding)
|
||||
{
|
||||
if (false === $pos) {
|
||||
@ -871,4 +970,76 @@ final class Mbstring
|
||||
|
||||
return $encoding;
|
||||
}
|
||||
|
||||
public static function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string
|
||||
{
|
||||
return self::mb_internal_trim('{^[%s]+|[%1$s]+$}Du', $string, $characters, $encoding, __FUNCTION__);
|
||||
}
|
||||
|
||||
public static function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string
|
||||
{
|
||||
return self::mb_internal_trim('{^[%s]+}Du', $string, $characters, $encoding, __FUNCTION__);
|
||||
}
|
||||
|
||||
public static function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string
|
||||
{
|
||||
return self::mb_internal_trim('{[%s]+$}Du', $string, $characters, $encoding, __FUNCTION__);
|
||||
}
|
||||
|
||||
private static function mb_internal_trim(string $regex, string $string, ?string $characters, ?string $encoding, string $function): string
|
||||
{
|
||||
if (null === $encoding) {
|
||||
$encoding = self::mb_internal_encoding();
|
||||
} else {
|
||||
self::assertEncoding($encoding, $function.'(): Argument #3 ($encoding) must be a valid encoding, "%s" given');
|
||||
}
|
||||
|
||||
if ('' === $characters) {
|
||||
return null === $encoding ? $string : self::mb_convert_encoding($string, $encoding);
|
||||
}
|
||||
|
||||
if ('UTF-8' === $encoding) {
|
||||
$encoding = null;
|
||||
if (!preg_match('//u', $string)) {
|
||||
$string = @iconv('UTF-8', 'UTF-8//IGNORE', $string);
|
||||
}
|
||||
if (null !== $characters && !preg_match('//u', $characters)) {
|
||||
$characters = @iconv('UTF-8', 'UTF-8//IGNORE', $characters);
|
||||
}
|
||||
} else {
|
||||
$string = iconv($encoding, 'UTF-8//IGNORE', $string);
|
||||
|
||||
if (null !== $characters) {
|
||||
$characters = iconv($encoding, 'UTF-8//IGNORE', $characters);
|
||||
}
|
||||
}
|
||||
|
||||
if (null === $characters) {
|
||||
$characters = "\\0 \f\n\r\t\v\u{00A0}\u{1680}\u{2000}\u{2001}\u{2002}\u{2003}\u{2004}\u{2005}\u{2006}\u{2007}\u{2008}\u{2009}\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}\u{0085}\u{180E}";
|
||||
} else {
|
||||
$characters = preg_quote($characters);
|
||||
}
|
||||
|
||||
$string = preg_replace(sprintf($regex, $characters), '', $string);
|
||||
|
||||
if (null === $encoding) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
return iconv('UTF-8', $encoding.'//IGNORE', $string);
|
||||
}
|
||||
|
||||
private static function assertEncoding(string $encoding, string $errorFormat): void
|
||||
{
|
||||
try {
|
||||
$validEncoding = @self::mb_check_encoding('', $encoding);
|
||||
} catch (\ValueError $e) {
|
||||
throw new \ValueError(sprintf($errorFormat, $encoding));
|
||||
}
|
||||
|
||||
// BC for PHP 7.3 and lower
|
||||
if (!$validEncoding) {
|
||||
throw new \ValueError(sprintf($errorFormat, $encoding));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
0
vendor/symfony/polyfill-mbstring/README.md
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-mbstring/README.md
vendored
Executable file → Normal file
119
vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php
vendored
Normal file
119
vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'İ' => 'i̇',
|
||||
'µ' => 'μ',
|
||||
'ſ' => 's',
|
||||
'ͅ' => 'ι',
|
||||
'ς' => 'σ',
|
||||
'ϐ' => 'β',
|
||||
'ϑ' => 'θ',
|
||||
'ϕ' => 'φ',
|
||||
'ϖ' => 'π',
|
||||
'ϰ' => 'κ',
|
||||
'ϱ' => 'ρ',
|
||||
'ϵ' => 'ε',
|
||||
'ẛ' => 'ṡ',
|
||||
'ι' => 'ι',
|
||||
'ß' => 'ss',
|
||||
'ʼn' => 'ʼn',
|
||||
'ǰ' => 'ǰ',
|
||||
'ΐ' => 'ΐ',
|
||||
'ΰ' => 'ΰ',
|
||||
'և' => 'եւ',
|
||||
'ẖ' => 'ẖ',
|
||||
'ẗ' => 'ẗ',
|
||||
'ẘ' => 'ẘ',
|
||||
'ẙ' => 'ẙ',
|
||||
'ẚ' => 'aʾ',
|
||||
'ẞ' => 'ss',
|
||||
'ὐ' => 'ὐ',
|
||||
'ὒ' => 'ὒ',
|
||||
'ὔ' => 'ὔ',
|
||||
'ὖ' => 'ὖ',
|
||||
'ᾀ' => 'ἀι',
|
||||
'ᾁ' => 'ἁι',
|
||||
'ᾂ' => 'ἂι',
|
||||
'ᾃ' => 'ἃι',
|
||||
'ᾄ' => 'ἄι',
|
||||
'ᾅ' => 'ἅι',
|
||||
'ᾆ' => 'ἆι',
|
||||
'ᾇ' => 'ἇι',
|
||||
'ᾈ' => 'ἀι',
|
||||
'ᾉ' => 'ἁι',
|
||||
'ᾊ' => 'ἂι',
|
||||
'ᾋ' => 'ἃι',
|
||||
'ᾌ' => 'ἄι',
|
||||
'ᾍ' => 'ἅι',
|
||||
'ᾎ' => 'ἆι',
|
||||
'ᾏ' => 'ἇι',
|
||||
'ᾐ' => 'ἠι',
|
||||
'ᾑ' => 'ἡι',
|
||||
'ᾒ' => 'ἢι',
|
||||
'ᾓ' => 'ἣι',
|
||||
'ᾔ' => 'ἤι',
|
||||
'ᾕ' => 'ἥι',
|
||||
'ᾖ' => 'ἦι',
|
||||
'ᾗ' => 'ἧι',
|
||||
'ᾘ' => 'ἠι',
|
||||
'ᾙ' => 'ἡι',
|
||||
'ᾚ' => 'ἢι',
|
||||
'ᾛ' => 'ἣι',
|
||||
'ᾜ' => 'ἤι',
|
||||
'ᾝ' => 'ἥι',
|
||||
'ᾞ' => 'ἦι',
|
||||
'ᾟ' => 'ἧι',
|
||||
'ᾠ' => 'ὠι',
|
||||
'ᾡ' => 'ὡι',
|
||||
'ᾢ' => 'ὢι',
|
||||
'ᾣ' => 'ὣι',
|
||||
'ᾤ' => 'ὤι',
|
||||
'ᾥ' => 'ὥι',
|
||||
'ᾦ' => 'ὦι',
|
||||
'ᾧ' => 'ὧι',
|
||||
'ᾨ' => 'ὠι',
|
||||
'ᾩ' => 'ὡι',
|
||||
'ᾪ' => 'ὢι',
|
||||
'ᾫ' => 'ὣι',
|
||||
'ᾬ' => 'ὤι',
|
||||
'ᾭ' => 'ὥι',
|
||||
'ᾮ' => 'ὦι',
|
||||
'ᾯ' => 'ὧι',
|
||||
'ᾲ' => 'ὰι',
|
||||
'ᾳ' => 'αι',
|
||||
'ᾴ' => 'άι',
|
||||
'ᾶ' => 'ᾶ',
|
||||
'ᾷ' => 'ᾶι',
|
||||
'ᾼ' => 'αι',
|
||||
'ῂ' => 'ὴι',
|
||||
'ῃ' => 'ηι',
|
||||
'ῄ' => 'ήι',
|
||||
'ῆ' => 'ῆ',
|
||||
'ῇ' => 'ῆι',
|
||||
'ῌ' => 'ηι',
|
||||
'ῒ' => 'ῒ',
|
||||
'ῖ' => 'ῖ',
|
||||
'ῗ' => 'ῗ',
|
||||
'ῢ' => 'ῢ',
|
||||
'ῤ' => 'ῤ',
|
||||
'ῦ' => 'ῦ',
|
||||
'ῧ' => 'ῧ',
|
||||
'ῲ' => 'ὼι',
|
||||
'ῳ' => 'ωι',
|
||||
'ῴ' => 'ώι',
|
||||
'ῶ' => 'ῶ',
|
||||
'ῷ' => 'ῶι',
|
||||
'ῼ' => 'ωι',
|
||||
'ff' => 'ff',
|
||||
'fi' => 'fi',
|
||||
'fl' => 'fl',
|
||||
'ffi' => 'ffi',
|
||||
'ffl' => 'ffl',
|
||||
'ſt' => 'st',
|
||||
'st' => 'st',
|
||||
'ﬓ' => 'մն',
|
||||
'ﬔ' => 'մե',
|
||||
'ﬕ' => 'մի',
|
||||
'ﬖ' => 'վն',
|
||||
'ﬗ' => 'մխ',
|
||||
];
|
||||
0
vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
vendored
Executable file → Normal file
25
vendor/symfony/polyfill-mbstring/bootstrap.php
vendored
Executable file → Normal file
25
vendor/symfony/polyfill-mbstring/bootstrap.php
vendored
Executable file → Normal file
@ -132,6 +132,31 @@ if (!function_exists('mb_str_split')) {
|
||||
function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_str_pad')) {
|
||||
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_ucfirst')) {
|
||||
function mb_ucfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_lcfirst')) {
|
||||
function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_trim')) {
|
||||
function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_ltrim')) {
|
||||
function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_rtrim')) {
|
||||
function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
|
||||
if (extension_loaded('mbstring')) {
|
||||
return;
|
||||
}
|
||||
|
||||
26
vendor/symfony/polyfill-mbstring/bootstrap80.php
vendored
Executable file → Normal file
26
vendor/symfony/polyfill-mbstring/bootstrap80.php
vendored
Executable file → Normal file
@ -93,7 +93,7 @@ if (!function_exists('mb_strstr')) {
|
||||
function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_get_info')) {
|
||||
function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); }
|
||||
function mb_get_info(?string $type = 'all'): array|string|int|false|null { return p\Mbstring::mb_get_info((string) $type); }
|
||||
}
|
||||
if (!function_exists('mb_http_output')) {
|
||||
function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); }
|
||||
@ -128,6 +128,30 @@ if (!function_exists('mb_str_split')) {
|
||||
function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_str_pad')) {
|
||||
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_ucfirst')) {
|
||||
function mb_ucfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_lcfirst')) {
|
||||
function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_trim')) {
|
||||
function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_ltrim')) {
|
||||
function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_rtrim')) {
|
||||
function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); }
|
||||
}
|
||||
|
||||
if (extension_loaded('mbstring')) {
|
||||
return;
|
||||
}
|
||||
|
||||
6
vendor/symfony/polyfill-mbstring/composer.json
vendored
Executable file → Normal file
6
vendor/symfony/polyfill-mbstring/composer.json
vendored
Executable file → Normal file
@ -16,7 +16,8 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2",
|
||||
"ext-iconv": "*"
|
||||
},
|
||||
"provide": {
|
||||
"ext-mbstring": "*"
|
||||
@ -30,9 +31,6 @@
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
|
||||
19
vendor/symfony/polyfill-php72/LICENSE
vendored
19
vendor/symfony/polyfill-php72/LICENSE
vendored
@ -1,19 +0,0 @@
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
217
vendor/symfony/polyfill-php72/Php72.php
vendored
217
vendor/symfony/polyfill-php72/Php72.php
vendored
@ -1,217 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Polyfill\Php72;
|
||||
|
||||
/**
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class Php72
|
||||
{
|
||||
private static $hashMask;
|
||||
|
||||
public static function utf8_encode($s)
|
||||
{
|
||||
$s .= $s;
|
||||
$len = \strlen($s);
|
||||
|
||||
for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) {
|
||||
switch (true) {
|
||||
case $s[$i] < "\x80": $s[$j] = $s[$i]; break;
|
||||
case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break;
|
||||
default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break;
|
||||
}
|
||||
}
|
||||
|
||||
return substr($s, 0, $j);
|
||||
}
|
||||
|
||||
public static function utf8_decode($s)
|
||||
{
|
||||
$s = (string) $s;
|
||||
$len = \strlen($s);
|
||||
|
||||
for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {
|
||||
switch ($s[$i] & "\xF0") {
|
||||
case "\xC0":
|
||||
case "\xD0":
|
||||
$c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F");
|
||||
$s[$j] = $c < 256 ? \chr($c) : '?';
|
||||
break;
|
||||
|
||||
case "\xF0":
|
||||
++$i;
|
||||
// no break
|
||||
|
||||
case "\xE0":
|
||||
$s[$j] = '?';
|
||||
$i += 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
$s[$j] = $s[$i];
|
||||
}
|
||||
}
|
||||
|
||||
return substr($s, 0, $j);
|
||||
}
|
||||
|
||||
public static function php_os_family()
|
||||
{
|
||||
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||
return 'Windows';
|
||||
}
|
||||
|
||||
$map = [
|
||||
'Darwin' => 'Darwin',
|
||||
'DragonFly' => 'BSD',
|
||||
'FreeBSD' => 'BSD',
|
||||
'NetBSD' => 'BSD',
|
||||
'OpenBSD' => 'BSD',
|
||||
'Linux' => 'Linux',
|
||||
'SunOS' => 'Solaris',
|
||||
];
|
||||
|
||||
return $map[\PHP_OS] ?? 'Unknown';
|
||||
}
|
||||
|
||||
public static function spl_object_id($object)
|
||||
{
|
||||
if (null === self::$hashMask) {
|
||||
self::initHashMask();
|
||||
}
|
||||
if (null === $hash = spl_object_hash($object)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// On 32-bit systems, PHP_INT_SIZE is 4,
|
||||
return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1));
|
||||
}
|
||||
|
||||
public static function sapi_windows_vt100_support($stream, $enable = null)
|
||||
{
|
||||
if (!\is_resource($stream)) {
|
||||
trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$meta = stream_get_meta_data($stream);
|
||||
|
||||
if ('STDIO' !== $meta['stream_type']) {
|
||||
trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// We cannot actually disable vt100 support if it is set
|
||||
if (false === $enable || !self::stream_isatty($stream)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The native function does not apply to stdin
|
||||
$meta = array_map('strtolower', $meta);
|
||||
$stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri'];
|
||||
|
||||
return !$stdin
|
||||
&& (false !== getenv('ANSICON')
|
||||
|| 'ON' === getenv('ConEmuANSI')
|
||||
|| 'xterm' === getenv('TERM')
|
||||
|| 'Hyper' === getenv('TERM_PROGRAM'));
|
||||
}
|
||||
|
||||
public static function stream_isatty($stream)
|
||||
{
|
||||
if (!\is_resource($stream)) {
|
||||
trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||
$stat = @fstat($stream);
|
||||
// Check if formatted mode is S_IFCHR
|
||||
return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
|
||||
}
|
||||
|
||||
return \function_exists('posix_isatty') && @posix_isatty($stream);
|
||||
}
|
||||
|
||||
private static function initHashMask()
|
||||
{
|
||||
$obj = (object) [];
|
||||
self::$hashMask = -1;
|
||||
|
||||
// check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below
|
||||
$obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'];
|
||||
foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) {
|
||||
if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) {
|
||||
$frame['line'] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!empty($frame['line'])) {
|
||||
ob_start();
|
||||
debug_zval_dump($obj);
|
||||
self::$hashMask = (int) substr(ob_get_clean(), 17);
|
||||
}
|
||||
|
||||
self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1));
|
||||
}
|
||||
|
||||
public static function mb_chr($code, $encoding = null)
|
||||
{
|
||||
if (0x80 > $code %= 0x200000) {
|
||||
$s = \chr($code);
|
||||
} elseif (0x800 > $code) {
|
||||
$s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
|
||||
} elseif (0x10000 > $code) {
|
||||
$s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
|
||||
} else {
|
||||
$s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
|
||||
}
|
||||
|
||||
if ('UTF-8' !== $encoding = $encoding ?? mb_internal_encoding()) {
|
||||
$s = mb_convert_encoding($s, $encoding, 'UTF-8');
|
||||
}
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
public static function mb_ord($s, $encoding = null)
|
||||
{
|
||||
if (null === $encoding) {
|
||||
$s = mb_convert_encoding($s, 'UTF-8');
|
||||
} elseif ('UTF-8' !== $encoding) {
|
||||
$s = mb_convert_encoding($s, 'UTF-8', $encoding);
|
||||
}
|
||||
|
||||
if (1 === \strlen($s)) {
|
||||
return \ord($s);
|
||||
}
|
||||
|
||||
$code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
|
||||
if (0xF0 <= $code) {
|
||||
return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
|
||||
}
|
||||
if (0xE0 <= $code) {
|
||||
return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
|
||||
}
|
||||
if (0xC0 <= $code) {
|
||||
return (($code - 0xC0) << 6) + $s[2] - 0x80;
|
||||
}
|
||||
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
35
vendor/symfony/polyfill-php72/README.md
vendored
35
vendor/symfony/polyfill-php72/README.md
vendored
@ -1,35 +0,0 @@
|
||||
Symfony Polyfill / Php72
|
||||
========================
|
||||
|
||||
This component provides functions added to PHP 7.2 core:
|
||||
|
||||
- [`spl_object_id`](https://php.net/spl_object_id)
|
||||
- [`stream_isatty`](https://php.net/stream_isatty)
|
||||
|
||||
And also functions added to PHP 7.2 mbstring:
|
||||
|
||||
- [`mb_ord`](https://php.net/mb_ord)
|
||||
- [`mb_chr`](https://php.net/mb_chr)
|
||||
- [`mb_scrub`](https://php.net/mb_scrub)
|
||||
|
||||
On Windows only:
|
||||
|
||||
- [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support)
|
||||
|
||||
Moved to core since 7.2 (was in the optional XML extension earlier):
|
||||
|
||||
- [`utf8_encode`](https://php.net/utf8_encode)
|
||||
- [`utf8_decode`](https://php.net/utf8_decode)
|
||||
|
||||
Also, it provides constants added to PHP 7.2:
|
||||
|
||||
- [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig)
|
||||
- [`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/main/README.md).
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
This library is released under the [MIT license](LICENSE).
|
||||
57
vendor/symfony/polyfill-php72/bootstrap.php
vendored
57
vendor/symfony/polyfill-php72/bootstrap.php
vendored
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Polyfill\Php72 as p;
|
||||
|
||||
if (\PHP_VERSION_ID >= 70200) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!defined('PHP_FLOAT_DIG')) {
|
||||
define('PHP_FLOAT_DIG', 15);
|
||||
}
|
||||
if (!defined('PHP_FLOAT_EPSILON')) {
|
||||
define('PHP_FLOAT_EPSILON', 2.2204460492503E-16);
|
||||
}
|
||||
if (!defined('PHP_FLOAT_MIN')) {
|
||||
define('PHP_FLOAT_MIN', 2.2250738585072E-308);
|
||||
}
|
||||
if (!defined('PHP_FLOAT_MAX')) {
|
||||
define('PHP_FLOAT_MAX', 1.7976931348623157E+308);
|
||||
}
|
||||
if (!defined('PHP_OS_FAMILY')) {
|
||||
define('PHP_OS_FAMILY', p\Php72::php_os_family());
|
||||
}
|
||||
|
||||
if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) {
|
||||
function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); }
|
||||
}
|
||||
if (!function_exists('stream_isatty')) {
|
||||
function stream_isatty($stream) { return p\Php72::stream_isatty($stream); }
|
||||
}
|
||||
if (!function_exists('utf8_encode')) {
|
||||
function utf8_encode($string) { return p\Php72::utf8_encode($string); }
|
||||
}
|
||||
if (!function_exists('utf8_decode')) {
|
||||
function utf8_decode($string) { return p\Php72::utf8_decode($string); }
|
||||
}
|
||||
if (!function_exists('spl_object_id')) {
|
||||
function spl_object_id($object) { return p\Php72::spl_object_id($object); }
|
||||
}
|
||||
if (!function_exists('mb_ord')) {
|
||||
function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_chr')) {
|
||||
function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_scrub')) {
|
||||
function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
|
||||
}
|
||||
35
vendor/symfony/polyfill-php72/composer.json
vendored
35
vendor/symfony/polyfill-php72/composer.json
vendored
@ -1,35 +0,0 @@
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"type": "library",
|
||||
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
|
||||
"keywords": ["polyfill", "shim", "compatibility", "portable"],
|
||||
"homepage": "https://symfony.com",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Php72\\": "" },
|
||||
"files": [ "bootstrap.php" ]
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
}
|
||||
}
|
||||
2
vendor/symfony/polyfill-php80/LICENSE
vendored
Executable file → Normal file
2
vendor/symfony/polyfill-php80/LICENSE
vendored
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2020 Fabien Potencier
|
||||
Copyright (c) 2020-present 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
|
||||
|
||||
0
vendor/symfony/polyfill-php80/Php80.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Php80.php
vendored
Executable file → Normal file
7
vendor/symfony/polyfill-php80/PhpToken.php
vendored
Executable file → Normal file
7
vendor/symfony/polyfill-php80/PhpToken.php
vendored
Executable file → Normal file
@ -29,7 +29,7 @@ class PhpToken implements \Stringable
|
||||
public $text;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var -1|positive-int
|
||||
*/
|
||||
public $line;
|
||||
|
||||
@ -38,6 +38,9 @@ class PhpToken implements \Stringable
|
||||
*/
|
||||
public $pos;
|
||||
|
||||
/**
|
||||
* @param -1|positive-int $line
|
||||
*/
|
||||
public function __construct(int $id, string $text, int $line = -1, int $position = -1)
|
||||
{
|
||||
$this->id = $id;
|
||||
@ -80,7 +83,7 @@ class PhpToken implements \Stringable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static[]
|
||||
* @return list<static>
|
||||
*/
|
||||
public static function tokenize(string $code, int $flags = 0): array
|
||||
{
|
||||
|
||||
0
vendor/symfony/polyfill-php80/README.md
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/README.md
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/bootstrap.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php80/bootstrap.php
vendored
Executable file → Normal file
5
vendor/symfony/polyfill-php80/composer.json
vendored
Executable file → Normal file
5
vendor/symfony/polyfill-php80/composer.json
vendored
Executable file → Normal file
@ -20,7 +20,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Php80\\": "" },
|
||||
@ -29,9 +29,6 @@
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
|
||||
2
vendor/symfony/polyfill-php81/LICENSE
vendored
Executable file → Normal file
2
vendor/symfony/polyfill-php81/LICENSE
vendored
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2021 Fabien Potencier
|
||||
Copyright (c) 2021-present 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
|
||||
|
||||
0
vendor/symfony/polyfill-php81/Php81.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php81/Php81.php
vendored
Executable file → Normal file
1
vendor/symfony/polyfill-php81/README.md
vendored
Executable file → Normal file
1
vendor/symfony/polyfill-php81/README.md
vendored
Executable file → Normal file
@ -7,6 +7,7 @@ This component provides features added to PHP 8.1 core:
|
||||
- [`enum_exists`](https://php.net/enum-exists)
|
||||
- [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant
|
||||
- [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types)
|
||||
- [`CURLStringFile`](https://php.net/CURLStringFile) (but only if PHP >= 7.4 is used)
|
||||
|
||||
More information can be found in the
|
||||
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
|
||||
|
||||
51
vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
vendored
Normal file
51
vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
if (\PHP_VERSION_ID >= 70400 && extension_loaded('curl')) {
|
||||
/**
|
||||
* @property string $data
|
||||
*/
|
||||
class CURLStringFile extends CURLFile
|
||||
{
|
||||
private $data;
|
||||
|
||||
public function __construct(string $data, string $postname, string $mime = 'application/octet-stream')
|
||||
{
|
||||
$this->data = $data;
|
||||
parent::__construct('data://application/octet-stream;base64,'.base64_encode($data), $mime, $postname);
|
||||
}
|
||||
|
||||
public function __set(string $name, $value): void
|
||||
{
|
||||
if ('data' !== $name) {
|
||||
$this->$name = $value;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_object($value) ? !method_exists($value, '__toString') : !is_scalar($value)) {
|
||||
throw new TypeError('Cannot assign '.gettype($value).' to property CURLStringFile::$data of type string');
|
||||
}
|
||||
|
||||
$this->name = 'data://application/octet-stream;base64,'.base64_encode($value);
|
||||
}
|
||||
|
||||
public function __isset(string $name): bool
|
||||
{
|
||||
return isset($this->$name);
|
||||
}
|
||||
|
||||
public function &__get(string $name)
|
||||
{
|
||||
return $this->$name;
|
||||
}
|
||||
}
|
||||
}
|
||||
0
vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php81/bootstrap.php
vendored
Executable file → Normal file
0
vendor/symfony/polyfill-php81/bootstrap.php
vendored
Executable file → Normal file
5
vendor/symfony/polyfill-php81/composer.json
vendored
Executable file → Normal file
5
vendor/symfony/polyfill-php81/composer.json
vendored
Executable file → Normal file
@ -16,7 +16,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Php81\\": "" },
|
||||
@ -25,9 +25,6 @@
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
|
||||
0
vendor/symfony/psr-http-message-bridge/.php-cs-fixer.dist.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/.php-cs-fixer.dist.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/PsrServerRequestResolver.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/PsrServerRequestResolver.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/ValueResolverInterface.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/ValueResolverInterface.php
vendored
Executable file → Normal file
4
vendor/symfony/psr-http-message-bridge/CHANGELOG.md
vendored
Executable file → Normal file
4
vendor/symfony/psr-http-message-bridge/CHANGELOG.md
vendored
Executable file → Normal file
@ -1,6 +1,10 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
# 2.3.1 (2023-07-26)
|
||||
|
||||
* Don't rely on `Request::getPayload()` to populate the parsed body
|
||||
|
||||
# 2.3.0 (2023-07-25)
|
||||
|
||||
* Leverage `Request::getPayload()` to populate the parsed body of PSR-7 requests
|
||||
|
||||
0
vendor/symfony/psr-http-message-bridge/EventListener/PsrResponseListener.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/EventListener/PsrResponseListener.php
vendored
Executable file → Normal file
8
vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php
vendored
Executable file → Normal file
8
vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php
vendored
Executable file → Normal file
@ -221,13 +221,13 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface
|
||||
return new Cookie(
|
||||
$cookieName,
|
||||
$cookieValue,
|
||||
isset($cookieExpire) ? $cookieExpire : 0,
|
||||
isset($cookiePath) ? $cookiePath : '/',
|
||||
isset($cookieDomain) ? $cookieDomain : null,
|
||||
$cookieExpire ?? 0,
|
||||
$cookiePath ?? '/',
|
||||
$cookieDomain ?? null,
|
||||
isset($cookieSecure),
|
||||
isset($cookieHttpOnly),
|
||||
true,
|
||||
isset($samesite) ? $samesite : null
|
||||
$samesite ?? null
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
11
vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php
vendored
Executable file → Normal file
11
vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php
vendored
Executable file → Normal file
@ -20,7 +20,6 @@ use Psr\Http\Message\UploadedFileFactoryInterface;
|
||||
use Psr\Http\Message\UploadedFileInterface;
|
||||
use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
use Symfony\Component\HttpFoundation\Exception\JsonException;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
@ -79,11 +78,11 @@ class PsrHttpFactory implements HttpMessageFactoryInterface
|
||||
$format = $symfonyRequest->getContentType();
|
||||
}
|
||||
|
||||
if (method_exists(Request::class, 'getPayload') && 'json' === $format) {
|
||||
try {
|
||||
$parsedBody = $symfonyRequest->getPayload()->all();
|
||||
} catch (JsonException $e) {
|
||||
$parsedBody = [];
|
||||
if ('json' === $format) {
|
||||
$parsedBody = json_decode($symfonyRequest->getContent(), true, 512, \JSON_BIGINT_AS_STRING);
|
||||
|
||||
if (!\is_array($parsedBody)) {
|
||||
$parsedBody = null;
|
||||
}
|
||||
} else {
|
||||
$parsedBody = $symfonyRequest->request->all();
|
||||
|
||||
0
vendor/symfony/psr-http-message-bridge/Factory/UploadedFile.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/Factory/UploadedFile.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/LICENSE
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/LICENSE
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/README.md
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/README.md
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/composer.json
vendored
Executable file → Normal file
0
vendor/symfony/psr-http-message-bridge/composer.json
vendored
Executable file → Normal file
Reference in New Issue
Block a user