From d0dcd543e4f901943a4efe627bee88e0effce7e7 Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Mon, 4 Jul 2022 22:13:55 -0500 Subject: [PATCH 1/4] Fix count() CallMap signature --- dictionaries/CallMap.php | 2 +- dictionaries/CallMap_80_delta.php | 4 ++++ tests/Internal/Codebase/InternalCallMapHandlerTest.php | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 10f9d7189c7..669b958e326 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -1543,7 +1543,7 @@ 'Couchbase\WildcardSearchQuery::jsonSerialize' => ['array'], 'Couchbase\zlibCompress' => ['string', 'data'=>'string'], 'Couchbase\zlibDecompress' => ['string', 'data'=>'string'], -'count' => ['int', 'value'=>'Countable|array|SimpleXMLElement|ResourceBundle', 'mode='=>'int'], +'count' => ['int', 'value'=>'Countable|array', 'mode='=>'int'], 'count_chars' => ['array', 'input'=>'string', 'mode='=>'0|1|2'], 'count_chars\'1' => ['string', 'input'=>'string', 'mode='=>'3|4'], 'Countable::count' => ['int'], diff --git a/dictionaries/CallMap_80_delta.php b/dictionaries/CallMap_80_delta.php index 97dad08f1f0..08960af1425 100644 --- a/dictionaries/CallMap_80_delta.php +++ b/dictionaries/CallMap_80_delta.php @@ -213,6 +213,10 @@ 'old' => ['bool', 'typelib_name'=>'string', 'case_insensitive='=>'bool'], 'new' => ['bool', 'typelib_name'=>'string', 'case_insensitive='=>'true'], ], + 'count' => [ + 'old' => ['int', 'value'=>'Countable|array|SimpleXMLElement|ResourceBundle', 'mode='=>'int'], + 'new' => ['int', 'value'=>'Countable|array', 'mode='=>'int'], + ], 'count_chars' => [ 'old' => ['array|false', 'input'=>'string', 'mode='=>'0|1|2'], 'new' => ['array', 'input'=>'string', 'mode='=>'0|1|2'], diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index 198509bceab..00fc592f170 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -52,7 +52,6 @@ class InternalCallMapHandlerTest extends TestCase 'bcmod', 'bcpowmod', 'bzdecompress', - 'count', 'crypt', 'date_isodate_set', 'debug_zval_dump', From c71dcd581e68582c202708d593b4a136a37422aa Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Mon, 4 Jul 2022 22:27:00 -0500 Subject: [PATCH 2/4] Fix fputcsv() CallMap signature --- dictionaries/CallMap.php | 2 +- dictionaries/CallMap_81_delta.php | 4 ++++ tests/Internal/Codebase/InternalCallMapHandlerTest.php | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 669b958e326..683997ab874 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -3323,7 +3323,7 @@ 'fpassthru' => ['int|false', 'stream'=>'resource'], 'fpm_get_status' => ['array|false'], 'fprintf' => ['int', 'stream'=>'resource', 'format'=>'string', '...values='=>'string|int|float'], -'fputcsv' => ['int|false', 'stream'=>'resource', 'fields'=>'array', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'], +'fputcsv' => ['int|false', 'stream'=>'resource', 'fields'=>'array', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string', 'eol='=>'string'], 'fputs' => ['int|false', 'stream'=>'resource', 'data'=>'string', 'length='=>'int'], 'fread' => ['string|false', 'stream'=>'resource', 'length'=>'int'], 'frenchtojd' => ['int', 'month'=>'int', 'day'=>'int', 'year'=>'int'], diff --git a/dictionaries/CallMap_81_delta.php b/dictionaries/CallMap_81_delta.php index a22c8b4613a..b5d3efea585 100644 --- a/dictionaries/CallMap_81_delta.php +++ b/dictionaries/CallMap_81_delta.php @@ -71,6 +71,10 @@ 'old' => ['bool', 'finfo'=>'resource', 'flags'=>'int'], 'new' => ['bool', 'finfo'=>'finfo', 'flags'=>'int'], ], + 'fputcsv' => [ + 'old' => ['int|false', 'stream'=>'resource', 'fields'=>'array', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'], + 'new' => ['int|false', 'stream'=>'resource', 'fields'=>'array', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string', 'eol='=>'string'], + ], 'ftp_connect' => [ 'old' => ['resource|false', 'hostname' => 'string', 'port=' => 'int', 'timeout=' => 'int'], 'new' => ['FTP\Connection|false', 'hostname' => 'string', 'port=' => 'int', 'timeout=' => 'int'], diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index 00fc592f170..29ce0fd614c 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -80,8 +80,6 @@ class InternalCallMapHandlerTest extends TestCase 'enchant_dict_suggest', 'enum_exists', 'extract', - // https://www.php.net/manual/en/function.fputcsv.php - 'fputcsv' => ['8.1'], 'get_class_methods', 'get_headers', 'get_parent_class', From 2469b6222dba1078eecae74164ac772db24e71ac Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Mon, 4 Jul 2022 22:29:26 -0500 Subject: [PATCH 3/4] Fix extract() CallMap signature --- dictionaries/CallMap.php | 2 +- dictionaries/CallMap_historical.php | 2 +- tests/Internal/Codebase/InternalCallMapHandlerTest.php | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 683997ab874..6d66e2d4bcd 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -2926,7 +2926,7 @@ 'explode' => ['list', 'separator'=>'string', 'string'=>'string', 'limit='=>'int'], 'expm1' => ['float', 'num'=>'float'], 'extension_loaded' => ['bool', 'extension'=>'string'], -'extract' => ['int', '&rw_array'=>'array', 'flags='=>'int', 'prefix='=>'?string'], +'extract' => ['int', '&rw_array'=>'array', 'flags='=>'int', 'prefix='=>'string'], 'ezmlm_hash' => ['int', 'addr'=>'string'], 'fam_cancel_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'], 'fam_close' => ['void', 'fam'=>'resource'], diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index ffff495f1fc..0f5a0f2d4c0 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -10544,7 +10544,7 @@ 'explode' => ['list|false', 'separator'=>'string', 'string'=>'string', 'limit='=>'int'], 'expm1' => ['float', 'num'=>'float'], 'extension_loaded' => ['bool', 'extension'=>'string'], - 'extract' => ['int', '&rw_array'=>'array', 'flags='=>'int', 'prefix='=>'?string'], + 'extract' => ['int', '&rw_array'=>'array', 'flags='=>'int', 'prefix='=>'string'], 'ezmlm_hash' => ['int', 'addr'=>'string'], 'fam_cancel_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'], 'fam_close' => ['void', 'fam'=>'resource'], diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index 29ce0fd614c..3ba9a2bb6dc 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -79,7 +79,6 @@ class InternalCallMapHandlerTest extends TestCase 'enchant_dict_store_replacement', 'enchant_dict_suggest', 'enum_exists', - 'extract', 'get_class_methods', 'get_headers', 'get_parent_class', From e0ebfe19a20156d19d40a7fbd8e53df759970372 Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Tue, 5 Jul 2022 00:50:34 -0500 Subject: [PATCH 4/4] Fix class functions CallMap signatures --- dictionaries/CallMap.php | 6 +++--- dictionaries/CallMap_80_delta.php | 8 ++++++++ dictionaries/CallMap_81_delta.php | 2 +- tests/Internal/Codebase/InternalCallMapHandlerTest.php | 3 --- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 6d66e2d4bcd..15ff459d4c9 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -2520,7 +2520,7 @@ 'enchant_dict_store_replacement' => ['void', 'dictionary'=>'resource', 'misspelled'=>'string', 'correct'=>'string'], 'enchant_dict_suggest' => ['array', 'dictionary'=>'resource', 'word'=>'string'], 'end' => ['mixed|false', '&r_array'=>'array|object'], -'enum_exists' => ['bool', 'class' => 'class-string', 'autoload=' => 'bool'], +'enum_exists' => ['bool', 'enum' => 'class-string', 'autoload=' => 'bool'], 'Error::__clone' => ['void'], 'Error::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?Error'], 'Error::__toString' => ['string'], @@ -3723,7 +3723,7 @@ 'get_called_class' => ['class-string'], 'get_cfg_var' => ['string|false', 'option'=>'string'], 'get_class' => ['class-string', 'object='=>'object'], -'get_class_methods' => ['list|null', 'object_or_class'=>'mixed'], +'get_class_methods' => ['list', 'object_or_class'=>'object|class-string'], 'get_class_vars' => ['array', 'class'=>'string'], 'get_current_user' => ['string'], 'get_debug_type' => ['string', 'value'=>'mixed'], @@ -3743,7 +3743,7 @@ 'get_magic_quotes_runtime' => ['int|false'], 'get_meta_tags' => ['array', 'filename'=>'string', 'use_include_path='=>'bool'], 'get_object_vars' => ['array', 'object'=>'object'], -'get_parent_class' => ['class-string|false', 'object_or_class='=>'mixed'], +'get_parent_class' => ['class-string|false', 'object_or_class='=>'object|class-string'], 'get_required_files' => ['list'], 'get_resource_id' => ['int', 'resource'=>'resource'], 'get_resource_type' => ['string', 'resource'=>'resource'], diff --git a/dictionaries/CallMap_80_delta.php b/dictionaries/CallMap_80_delta.php index 08960af1425..e7e4323b5a2 100644 --- a/dictionaries/CallMap_80_delta.php +++ b/dictionaries/CallMap_80_delta.php @@ -357,6 +357,14 @@ 'old' => ['list|false', 'separator'=>'string', 'string'=>'string', 'limit='=>'int'], 'new' => ['list', 'separator'=>'string', 'string'=>'string', 'limit='=>'int'], ], + 'get_class_methods' => [ + 'old' => ['list|null', 'object_or_class'=>'mixed'], + 'new' => ['list', 'object_or_class'=>'object|class-string'], + ], + 'get_parent_class' => [ + 'old' => ['class-string|false', 'object_or_class='=>'mixed'], + 'new' => ['class-string|false', 'object_or_class='=>'object|class-string'], + ], 'gmdate' => [ 'old' => ['string', 'format'=>'string', 'timestamp='=>'int'], 'new' => ['string', 'format'=>'string', 'timestamp='=>'int|null'], diff --git a/dictionaries/CallMap_81_delta.php b/dictionaries/CallMap_81_delta.php index b5d3efea585..13c10cd77a1 100644 --- a/dictionaries/CallMap_81_delta.php +++ b/dictionaries/CallMap_81_delta.php @@ -17,7 +17,7 @@ return [ 'added' => [ 'array_is_list' => ['bool', 'array' => 'array'], - 'enum_exists' => ['bool', 'class' => 'class-string', 'autoload=' => 'bool'], + 'enum_exists' => ['bool', 'enum' => 'class-string', 'autoload=' => 'bool'], 'fsync' => ['bool', 'stream' => 'resource'], 'fdatasync' => ['bool', 'stream' => 'resource'], 'imageavif' => ['bool', 'image'=>'GdImage', 'file='=>'resource|string|null', 'quality='=>'int', 'speed='=>'int'], diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index 3ba9a2bb6dc..72ef664ae14 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -78,10 +78,7 @@ class InternalCallMapHandlerTest extends TestCase 'enchant_dict_quick_check', 'enchant_dict_store_replacement', 'enchant_dict_suggest', - 'enum_exists', - 'get_class_methods', 'get_headers', - 'get_parent_class', 'gmp_clrbit', 'gmp_div', 'gmp_setbit',