mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-09 00:13:58 +09:00
Updates to vendors etc
This commit is contained in:
32
vendor/symfony/polyfill-php83/Php83.php
vendored
32
vendor/symfony/polyfill-php83/Php83.php
vendored
@@ -40,7 +40,7 @@ final class Php83
|
||||
return \JSON_ERROR_NONE === json_last_error();
|
||||
}
|
||||
|
||||
public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string
|
||||
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');
|
||||
@@ -90,17 +90,17 @@ final class Php83
|
||||
throw new \ValueError('str_increment(): Argument #1 ($string) cannot be empty');
|
||||
}
|
||||
|
||||
if (!\preg_match("/^[a-zA-Z0-9]+$/", $string)) {
|
||||
if (!preg_match('/^[a-zA-Z0-9]+$/', $string)) {
|
||||
throw new \ValueError('str_increment(): Argument #1 ($string) must be composed only of alphanumeric ASCII characters');
|
||||
}
|
||||
|
||||
if (\is_numeric($string)) {
|
||||
if (is_numeric($string)) {
|
||||
$offset = stripos($string, 'e');
|
||||
if ($offset !== false) {
|
||||
if (false !== $offset) {
|
||||
$char = $string[$offset];
|
||||
$char++;
|
||||
++$char;
|
||||
$string[$offset] = $char;
|
||||
$string++;
|
||||
++$string;
|
||||
|
||||
switch ($string[$offset]) {
|
||||
case 'f':
|
||||
@@ -130,28 +130,28 @@ final class Php83
|
||||
throw new \ValueError('str_decrement(): Argument #1 ($string) cannot be empty');
|
||||
}
|
||||
|
||||
if (!\preg_match("/^[a-zA-Z0-9]+$/", $string)) {
|
||||
if (!preg_match('/^[a-zA-Z0-9]+$/', $string)) {
|
||||
throw new \ValueError('str_decrement(): Argument #1 ($string) must be composed only of alphanumeric ASCII characters');
|
||||
}
|
||||
|
||||
if (\preg_match('/\A(?:0[aA0]?|[aA])\z/', $string)) {
|
||||
if (preg_match('/\A(?:0[aA0]?|[aA])\z/', $string)) {
|
||||
throw new \ValueError(sprintf('str_decrement(): Argument #1 ($string) "%s" is out of decrement range', $string));
|
||||
}
|
||||
|
||||
if (!\in_array(substr($string, -1), ['A', 'a', '0'], true)) {
|
||||
return join('', array_slice(str_split($string), 0, -1)) . chr(ord(substr($string, -1)) - 1);
|
||||
return implode('', \array_slice(str_split($string), 0, -1)).\chr(\ord(substr($string, -1)) - 1);
|
||||
}
|
||||
|
||||
$carry = '';
|
||||
$decremented = '';
|
||||
|
||||
for ($i = strlen($string) - 1; $i >= 0; $i--) {
|
||||
for ($i = \strlen($string) - 1; $i >= 0; --$i) {
|
||||
$char = $string[$i];
|
||||
|
||||
switch ($char) {
|
||||
case 'A':
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
$carry = 'Z';
|
||||
@@ -159,7 +159,7 @@ final class Php83
|
||||
break;
|
||||
case 'a':
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
$carry = 'z';
|
||||
@@ -167,7 +167,7 @@ final class Php83
|
||||
break;
|
||||
case '0':
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
$carry = '9';
|
||||
@@ -175,19 +175,19 @@ final class Php83
|
||||
break;
|
||||
case '1':
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
|
||||
if (!\in_array($char, ['A', 'a', '0'], true)) {
|
||||
$decremented = chr(ord($char) - 1) . $decremented;
|
||||
$decremented = \chr(\ord($char) - 1).$decremented;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
8
vendor/symfony/polyfill-php83/bootstrap.php
vendored
8
vendor/symfony/polyfill-php83/bootstrap.php
vendored
@@ -19,8 +19,10 @@ if (!function_exists('json_validate')) {
|
||||
function json_validate(string $json, int $depth = 512, int $flags = 0): bool { return p\Php83::json_validate($json, $depth, $flags); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_str_pad') && function_exists('mb_substr')) {
|
||||
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Php83::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
||||
if (extension_loaded('mbstring')) {
|
||||
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\Php83::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('stream_context_set_options')) {
|
||||
@@ -40,7 +42,7 @@ if (\PHP_VERSION_ID >= 80100) {
|
||||
}
|
||||
|
||||
if (!function_exists('ldap_exop_sync') && function_exists('ldap_exop')) {
|
||||
function ldap_exop_sync($ldap, string $request_oid, string $request_data = null, array $controls = null, &$response_data = null, &$response_oid = null): bool { return ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid); }
|
||||
function ldap_exop_sync($ldap, string $request_oid, ?string $request_data = null, ?array $controls = null, &$response_data = null, &$response_oid = null): bool { return ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid); }
|
||||
}
|
||||
|
||||
if (!function_exists('ldap_connect_wallet') && function_exists('ldap_connect')) {
|
||||
|
||||
@@ -14,7 +14,7 @@ if (\PHP_VERSION_ID >= 80300) {
|
||||
}
|
||||
|
||||
if (!function_exists('ldap_exop_sync') && function_exists('ldap_exop')) {
|
||||
function ldap_exop_sync(\LDAP\Connection $ldap, string $request_oid, string $request_data = null, array $controls = null, &$response_data = null, &$response_oid = null): bool { return ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid); }
|
||||
function ldap_exop_sync(\LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = null, &$response_data = null, &$response_oid = null): bool { return ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid); }
|
||||
}
|
||||
|
||||
if (!function_exists('ldap_connect_wallet') && function_exists('ldap_connect')) {
|
||||
|
||||
3
vendor/symfony/polyfill-php83/composer.json
vendored
3
vendor/symfony/polyfill-php83/composer.json
vendored
@@ -16,8 +16,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"symfony/polyfill-php80": "^1.14"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Php83\\": "" },
|
||||
|
||||
Reference in New Issue
Block a user