diff --git a/src/Mbstring/bootstrap80.php b/src/Mbstring/bootstrap80.php index 8016bdb48..5be7d2018 100644 --- a/src/Mbstring/bootstrap80.php +++ b/src/Mbstring/bootstrap80.php @@ -93,7 +93,7 @@ function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?strin 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); } diff --git a/src/Util/TestListenerTrait.php b/src/Util/TestListenerTrait.php index 3b87d426d..20fb25b74 100644 --- a/src/Util/TestListenerTrait.php +++ b/src/Util/TestListenerTrait.php @@ -129,10 +129,18 @@ function {$f['name']}{$f['signature']} 'array|string|null $string' => 'array|string $string', 'array|string|null $from_encoding = null' => 'array|string|null $from_encoding = null', 'array|string|null $from_encoding' => 'array|string $from_encoding', + 'string $characters = null' => '?string $characters = null', + 'string $charset = null' => '?string $charset = null', + 'string $encoding = null' => '?string $encoding = null', + 'string $language = null' => '?string $language = null', + 'string $transfer_encoding = null' => '?string $transfer_encoding = null', + 'string $type = null' => '?string $type = null', + 'int $length = null' => '?int $length = null', ]; if (strtr($polyfillSignature, $map) !== $originalSignature) { - $warnings[] = TestListener::warning("Incompatible signature for PHP >= 8:\n- {$f['name']}$originalSignature\n+ {$f['name']}$polyfillSignature"); + $mapped = strtr($polyfillSignature, $map); + $warnings[] = TestListener::warning("Incompatible signature for PHP >= 8:\n- {$f['name']}$originalSignature\n+ {$f['name']}$polyfillSignature\nmap: $mapped"); } } }