From ce76158085afa6928b018bc559765784db59523e Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Tue, 16 Aug 2022 17:28:54 +0200 Subject: [PATCH 1/2] fix crash in ['bool', 'typelib_name'=>'string', 'case_insensitive='=>'true'], ], 'count' => [ - 'old' => ['int', 'value'=>'Countable|array|SimpleXMLElement|ResourceBundle', 'mode='=>'int'], + 'old' => ['int', 'value'=>'Countable|array|SimpleXMLElement', 'mode='=>'int'], 'new' => ['int', 'value'=>'Countable|array', 'mode='=>'int'], ], 'count_chars' => [ diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index a8ad6acd48e..0fc9a97fbd0 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -10085,7 +10085,7 @@ 'copy' => ['bool', 'from'=>'string', 'to'=>'string', 'context='=>'resource'], 'cos' => ['float', 'num'=>'float'], 'cosh' => ['float', 'num'=>'float'], - 'count' => ['int', 'value'=>'Countable|array|SimpleXMLElement|ResourceBundle', 'mode='=>'int'], + 'count' => ['int', 'value'=>'Countable|array|SimpleXMLElement', 'mode='=>'int'], 'count_chars' => ['array|false', 'input'=>'string', 'mode='=>'0|1|2'], 'count_chars\'1' => ['string|false', 'input'=>'string', 'mode='=>'3|4'], 'crack_check' => ['bool', 'dictionary'=>'', 'password'=>'string'], diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index f5be423c569..2f02ad18355 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -51,6 +51,7 @@ class InternalCallMapHandlerTest extends TestCase private static $ignoredFunctions = [ 'apcu_entry', 'array_multisort', + 'count', // #8346 'bcdiv', 'bcmod', 'bcpowmod', From 328561d3880c2e267b211ff307f82e3189e7a9fb Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Thu, 22 Sep 2022 00:41:06 +0200 Subject: [PATCH 2/2] add code for faster debugging next time --- tests/Internal/Codebase/InternalCallMapHandlerTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index 2f02ad18355..0821cd9cae5 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -51,7 +51,6 @@ class InternalCallMapHandlerTest extends TestCase private static $ignoredFunctions = [ 'apcu_entry', 'array_multisort', - 'count', // #8346 'bcdiv', 'bcmod', 'bcpowmod', @@ -520,7 +519,13 @@ public function testIgnoresAreSortedAndUnique(): void /** @var string */ $function = is_int($key) ? $value : $key; - $this->assertGreaterThan(0, strcmp($function, $previousFunction)); + $diff = strcmp($function, $previousFunction); + if ($diff <= 0) { + // faster debugging errors in tests + echo "\n" . $previousFunction . "\n" . $function . "\n"; + } + + $this->assertGreaterThan(0, $diff); $previousFunction = $function; } }