From 22379c751ce64df065b1e8e053f3c75d4293211e Mon Sep 17 00:00:00 2001 From: ADmad Date: Sat, 8 Jun 2024 13:18:02 +0530 Subject: [PATCH 1/3] Fix signature of Locale::canonicalize. The method can return null, https://www.php.net/manual/en/locale.canonicalize.php. --- dictionaries/CallMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index d0bfe5486cb..210571b5dff 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -6446,7 +6446,7 @@ 'litespeed_request_headers' => ['array'], 'litespeed_response_headers' => ['array'], 'Locale::acceptFromHttp' => ['string|false', 'header'=>'string'], -'Locale::canonicalize' => ['string', 'locale'=>'string'], +'Locale::canonicalize' => ['?string', 'locale'=>'string'], 'Locale::composeLocale' => ['string', 'subtags'=>'array'], 'Locale::filterMatches' => ['?bool', 'languageTag'=>'string', 'locale'=>'string', 'canonicalize='=>'bool'], 'Locale::getAllVariants' => ['array', 'locale'=>'string'], From c8a0d5e665df83bf986e0f58ae253583a231af1f Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 10 Jun 2024 11:13:58 +0530 Subject: [PATCH 2/3] Fix signature for Locale::canonicalize() --- dictionaries/CallMap_historical.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index 37681adfec7..f87f7759846 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -3393,7 +3393,7 @@ 'LimitIterator::seek' => ['int', 'offset'=>'int'], 'LimitIterator::valid' => ['bool'], 'Locale::acceptFromHttp' => ['string|false', 'header'=>'string'], - 'Locale::canonicalize' => ['string', 'locale'=>'string'], + 'Locale::canonicalize' => ['?string', 'locale'=>'string'], 'Locale::composeLocale' => ['string', 'subtags'=>'array'], 'Locale::filterMatches' => ['?bool', 'languageTag'=>'string', 'locale'=>'string', 'canonicalize='=>'bool'], 'Locale::getAllVariants' => ['array', 'locale'=>'string'], From 626efd51073d46382c0108439321cc2f4721341d Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 10 Jun 2024 19:38:50 +0530 Subject: [PATCH 3/3] Update test --- tests/Internal/Codebase/InternalCallMapHandlerTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index 82909f86027..e5f6320fba5 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -198,7 +198,6 @@ class InternalCallMapHandlerTest extends TestCase 'infiniteiterator::getinneriterator' => ['8.1', '8.2', '8.3'], 'iteratoriterator::getinneriterator' => ['8.1', '8.2', '8.3'], 'limititerator::getinneriterator' => ['8.1', '8.2', '8.3'], - 'locale::canonicalize' => ['8.1', '8.2', '8.3'], 'locale::getallvariants' => ['8.1', '8.2', '8.3'], 'locale::getkeywords' => ['8.1', '8.2', '8.3'], 'locale::getprimarylanguage' => ['8.1', '8.2', '8.3'],