Skip to content

Commit

Permalink
Merge pull request #9273 from othercorey/php82-callmap
Browse files Browse the repository at this point in the history
Update callmap types for php 8.2
  • Loading branch information
orklah committed Feb 12, 2023
2 parents 0fb0714 + 42e301c commit f86c65c
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 83 deletions.
64 changes: 32 additions & 32 deletions dictionaries/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@
'ArrayObject::uasort' => ['void', 'cmp_function'=>'callable(mixed,mixed):int'],
'ArrayObject::uksort' => ['void', 'cmp_function'=>'callable(mixed,mixed):int'],
'ArrayObject::unserialize' => ['void', 'serialized'=>'string'],
'arsort' => ['bool', '&rw_array'=>'array', 'flags='=>'int'],
'arsort' => ['true', '&rw_array'=>'array', 'flags='=>'int'],
'asin' => ['float', 'num'=>'float'],
'asinh' => ['float', 'num'=>'float'],
'asort' => ['bool', '&rw_array'=>'array', 'flags='=>'int'],
'asort' => ['true', '&rw_array'=>'array', 'flags='=>'int'],
'assert' => ['bool', 'assertion'=>'string|bool|int', 'description='=>'string|Throwable|null'],
'assert_options' => ['mixed|false', 'option'=>'int', 'value='=>'mixed'],
'ast\get_kind_name' => ['string', 'kind'=>'int'],
Expand Down Expand Up @@ -1078,7 +1078,7 @@
'ClosedGeneratorException::getTrace' => ['list<array{file?:string,line?:int,function:string,class?:class-string,type?:\'::\'|\'->\',args?:array<mixed>}>'],
'ClosedGeneratorException::getTraceAsString' => ['string'],
'closedir' => ['void', 'dir_handle='=>'resource'],
'closelog' => ['bool'],
'closelog' => ['true'],
'Closure::__construct' => ['void'],
'Closure::__invoke' => ['', '...args='=>''],
'Closure::bind' => ['Closure|false', 'old'=>'Closure', 'to'=>'?object', 'scope='=>'object|string'],
Expand Down Expand Up @@ -1879,9 +1879,9 @@
'dba_key_split' => ['array|false', 'key'=>'string|false|null'],
'dba_list' => ['array'],
'dba_nextkey' => ['string', 'dba'=>'resource'],
'dba_open' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'string', '...handler_params='=>'string'],
'dba_open' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'?string', 'permission='=>'int', 'map_size='=>'int', 'flags='=>'?int'],
'dba_optimize' => ['bool', 'dba'=>'resource'],
'dba_popen' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'string', '...handler_params='=>'string'],
'dba_popen' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'?string', 'permission='=>'int', 'map_size='=>'int', 'flags='=>'?int'],
'dba_replace' => ['bool', 'key'=>'string', 'value'=>'string', 'dba'=>'resource'],
'dba_sync' => ['bool', 'dba'=>'resource'],
'dbase_add_record' => ['bool', 'dbase_identifier'=>'resource', 'record'=>'array'],
Expand Down Expand Up @@ -2463,7 +2463,7 @@
'EmptyIterator::key' => ['never'],
'EmptyIterator::next' => ['void'],
'EmptyIterator::rewind' => ['void'],
'EmptyIterator::valid' => ['bool'],
'EmptyIterator::valid' => ['false'],
'enchant_broker_describe' => ['array', 'broker'=>'EnchantBroker'],
'enchant_broker_dict_exists' => ['bool', 'broker'=>'EnchantBroker', 'tag'=>'string'],
'enchant_broker_free' => ['bool', 'broker'=>'EnchantBroker'],
Expand Down Expand Up @@ -6621,8 +6621,8 @@
'kadm5_modify_principal' => ['bool', 'handle'=>'resource', 'principal'=>'string', 'options'=>'array'],
'key' => ['int|string|null', 'array'=>'array|object'],
'key_exists' => ['bool', 'key'=>'string|int', 'array'=>'array'],
'krsort' => ['bool', '&rw_array'=>'array', 'flags='=>'int'],
'ksort' => ['bool', '&rw_array'=>'array', 'flags='=>'int'],
'krsort' => ['true', '&rw_array'=>'array', 'flags='=>'int'],
'ksort' => ['true', '&rw_array'=>'array', 'flags='=>'int'],
'KTaglib_ID3v2_AttachedPictureFrame::getDescription' => ['string'],
'KTaglib_ID3v2_AttachedPictureFrame::getMimeType' => ['string'],
'KTaglib_ID3v2_AttachedPictureFrame::getType' => ['int'],
Expand Down Expand Up @@ -8260,13 +8260,13 @@
'mysqli_begin_transaction' => ['bool', 'mysql'=>'mysqli', 'flags='=>'int', 'name='=>'?string'],
'mysqli_change_user' => ['bool', 'mysql'=>'mysqli', 'username'=>'string', 'password'=>'string', 'database'=>'?string'],
'mysqli_character_set_name' => ['string', 'mysql'=>'mysqli'],
'mysqli_close' => ['bool', 'mysql'=>'mysqli'],
'mysqli_close' => ['true', 'mysql'=>'mysqli'],
'mysqli_commit' => ['bool', 'mysql'=>'mysqli', 'flags='=>'int', 'name='=>'?string'],
'mysqli_connect' => ['mysqli|false', 'hostname='=>'string|null', 'username='=>'string|null', 'password='=>'string|null', 'database='=>'string|null', 'port='=>'int|null', 'socket='=>'string|null'],
'mysqli_connect_errno' => ['int'],
'mysqli_connect_error' => ['?string'],
'mysqli_data_seek' => ['bool', 'result'=>'mysqli_result', 'offset'=>'int'],
'mysqli_debug' => ['bool', 'options'=>'string'],
'mysqli_debug' => ['true', 'options'=>'string'],
'mysqli_disable_reads_from_master' => ['bool', 'link'=>'mysqli'],
'mysqli_disable_rpl_parse' => ['bool', 'link'=>'mysqli'],
'mysqli_driver::embedded_server_end' => ['void'],
Expand All @@ -8281,7 +8281,7 @@
'mysqli_error_list' => ['array', 'mysql'=>'mysqli'],
'mysqli_escape_string' => ['string', 'mysql'=>'mysqli', 'string'=>'string'],
'mysqli_execute' => ['bool', 'statement'=>'mysqli_stmt', 'params='=>'list<mixed>|null'],
'mysqli_execute_query' => ['mysqli_result|bool', 'mysqli'=>'mysqli', 'query'=>'non-empty-string', 'params='=>'list<mixed>|null'],
'mysqli_execute_query' => ['mysqli_result|bool', 'mysql'=>'mysqli', 'query'=>'non-empty-string', 'params='=>'list<mixed>|null'],
'mysqli_fetch_all' => ['list<array<array-key,null|int|float|string>>', 'result'=>'mysqli_result', 'mode='=>'3'],
'mysqli_fetch_all\'1' => ['list<array<string,null|int|float|string>>', 'result'=>'mysqli_result', 'mode='=>'1'],
'mysqli_fetch_all\'2' => ['list<list<null|int|float|string>>', 'result'=>'mysqli_result', 'mode='=>'2'],
Expand Down Expand Up @@ -8395,7 +8395,7 @@
'mysqli_stmt_attr_set' => ['bool', 'statement'=>'mysqli_stmt', 'attribute'=>'int', 'value'=>'int'],
'mysqli_stmt_bind_param' => ['bool', 'statement'=>'mysqli_stmt', 'types'=>'string', '&vars'=>'mixed', '&...args='=>'mixed'],
'mysqli_stmt_bind_result' => ['bool', 'statement'=>'mysqli_stmt', '&w_var1'=>'', '&...w_vars='=>''],
'mysqli_stmt_close' => ['bool', 'statement'=>'mysqli_stmt'],
'mysqli_stmt_close' => ['true', 'statement'=>'mysqli_stmt'],
'mysqli_stmt_data_seek' => ['void', 'statement'=>'mysqli_stmt', 'offset'=>'int'],
'mysqli_stmt_errno' => ['int', 'statement'=>'mysqli_stmt'],
'mysqli_stmt_error' => ['string', 'statement'=>'mysqli_stmt'],
Expand Down Expand Up @@ -9013,7 +9013,7 @@
'openal_source_stop' => ['bool', 'source'=>'resource'],
'openal_stream' => ['resource', 'source'=>'resource', 'format'=>'int', 'rate'=>'int'],
'opendir' => ['resource|false', 'directory'=>'string', 'context='=>'resource'],
'openlog' => ['bool', 'prefix'=>'string', 'flags'=>'int', 'facility'=>'int'],
'openlog' => ['true', 'prefix'=>'string', 'flags'=>'int', 'facility'=>'int'],
'openssl_cipher_iv_length' => ['int|false', 'cipher_algo'=>'string'],
'openssl_cipher_key_length' => ['positive-int|false', 'cipher_algo'=>'non-empty-string'],
'openssl_csr_export' => ['bool', 'csr'=>'OpenSSLCertificateSigningRequest|string', '&w_output'=>'string', 'no_text='=>'bool'],
Expand Down Expand Up @@ -9861,7 +9861,7 @@
'php_user_filter::filter' => ['int', 'in'=>'resource', 'out'=>'resource', '&rw_consumed'=>'int', 'closing'=>'bool'],
'php_user_filter::onClose' => ['void'],
'php_user_filter::onCreate' => ['bool'],
'phpcredits' => ['bool', 'flags='=>'int'],
'phpcredits' => ['true', 'flags='=>'int'],
'phpdbg_break_file' => ['void', 'file'=>'string', 'line'=>'int'],
'phpdbg_break_function' => ['void', 'function'=>'string'],
'phpdbg_break_method' => ['void', 'class'=>'string', 'method'=>'string'],
Expand All @@ -9873,7 +9873,7 @@
'phpdbg_get_executable' => ['array', 'options='=>'array'],
'phpdbg_prompt' => ['void', 'string'=>'string'],
'phpdbg_start_oplog' => ['void'],
'phpinfo' => ['bool', 'flags='=>'int'],
'phpinfo' => ['true', 'flags='=>'int'],
'PhpToken::tokenize' => ['list<PhpToken>', 'code'=>'string', 'flags='=>'int'],
'PhpToken::is' => ['bool', 'kind'=>'string|int|string[]|int[]'],
'PhpToken::isIgnorable' => ['bool'],
Expand Down Expand Up @@ -11870,7 +11870,7 @@
'shmop_size' => ['int', 'shmop'=>'Shmop'],
'shmop_write' => ['int', 'shmop'=>'Shmop', 'data'=>'string', 'offset'=>'int'],
'show_source' => ['string|bool', 'filename'=>'string', 'return='=>'bool'],
'shuffle' => ['bool', '&rw_array'=>'array'],
'shuffle' => ['true', '&rw_array'=>'array'],
'signeurlpaiement' => ['string', 'clent'=>'string', 'data'=>'string'],
'similar_text' => ['int', 'string1'=>'string', 'string2'=>'string', '&w_percent='=>'float'],
'simplexml_import_dom' => ['?SimpleXMLElement', 'node'=>'DOMNode', 'class_name='=>'?string'],
Expand Down Expand Up @@ -12797,7 +12797,7 @@
'SolrUtils::escapeQueryChars' => ['string|false', 'string'=>'string'],
'SolrUtils::getSolrVersion' => ['string'],
'SolrUtils::queryPhrase' => ['string', 'string'=>'string'],
'sort' => ['bool', '&rw_array'=>'array', 'flags='=>'int'],
'sort' => ['true', '&rw_array'=>'array', 'flags='=>'int'],
'soundex' => ['string', 'string'=>'string'],
'SphinxClient::__construct' => ['void'],
'SphinxClient::addQuery' => ['int', 'query'=>'string', 'index='=>'string', 'comment='=>'string'],
Expand Down Expand Up @@ -13131,7 +13131,7 @@
'SplTempFileObject::getRealPath' => ['string|false'],
'SplTempFileObject::getSize' => ['int|false'],
'SplTempFileObject::getType' => ['string|false'],
'SplTempFileObject::hasChildren' => ['bool'],
'SplTempFileObject::hasChildren' => ['false'],
'SplTempFileObject::isDir' => ['bool'],
'SplTempFileObject::isExecutable' => ['bool'],
'SplTempFileObject::isFile' => ['bool'],
Expand Down Expand Up @@ -14175,7 +14175,7 @@
'SyncSharedMemory::write' => ['int', 'string='=>'string', 'start='=>'int'],
'sys_get_temp_dir' => ['string'],
'sys_getloadavg' => ['array'],
'syslog' => ['bool', 'priority'=>'int', 'message'=>'string'],
'syslog' => ['true', 'priority'=>'int', 'message'=>'string'],
'system' => ['string|false', 'command'=>'string', '&w_result_code='=>'int'],
'taint' => ['bool', '&rw_string'=>'string', '&...w_other_strings='=>'string'],
'tan' => ['float', 'num'=>'float'],
Expand Down Expand Up @@ -14576,7 +14576,7 @@
'TypeError::getPrevious' => ['?Throwable'],
'TypeError::getTrace' => ['list<array{file?:string,line?:int,function:string,class?:class-string,type?:\'::\'|\'->\',args?:array<mixed>}>'],
'TypeError::getTraceAsString' => ['string'],
'uasort' => ['bool', '&rw_array'=>'array', 'callback'=>'callable(mixed,mixed):int'],
'uasort' => ['true', '&rw_array'=>'array', 'callback'=>'callable(mixed,mixed):int'],
'ucfirst' => ['string', 'string'=>'string'],
'UConverter::__construct' => ['void', 'destination_encoding='=>'?string', 'source_encoding='=>'?string'],
'UConverter::convert' => ['string', 'string'=>'string', 'reverse='=>'bool'],
Expand Down Expand Up @@ -14787,7 +14787,7 @@
'ui\window::setMargin' => ['', 'margin'=>'bool'],
'ui\window::setSize' => ['', 'size'=>'UI\Size'],
'ui\window::setTitle' => ['', 'title'=>'string'],
'uksort' => ['bool', '&rw_array'=>'array', 'callback'=>'callable(mixed,mixed):int'],
'uksort' => ['true', '&rw_array'=>'array', 'callback'=>'callable(mixed,mixed):int'],
'umask' => ['int', 'mask='=>'?int'],
'UnderflowException::__clone' => ['void'],
'UnderflowException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable'],
Expand Down Expand Up @@ -14864,7 +14864,7 @@
'use_soap_error_handler' => ['bool', 'enable='=>'bool'],
'user_error' => ['bool', 'message'=>'string', 'error_level='=>'int'],
'usleep' => ['void', 'microseconds'=>'positive-int|0'],
'usort' => ['bool', '&rw_array'=>'array', 'callback'=>'callable(mixed,mixed):int'],
'usort' => ['true', '&rw_array'=>'array', 'callback'=>'callable(mixed,mixed):int'],
'utf8_decode' => ['string', 'string'=>'string'],
'utf8_encode' => ['string', 'string'=>'string'],
'V8Js::__construct' => ['void', 'object_name='=>'string', 'variables='=>'array', 'extensions='=>'array', 'report_uncaught_exceptions='=>'bool', 'snapshot_blob='=>'string'],
Expand Down Expand Up @@ -15301,16 +15301,16 @@
'xml_parser_free' => ['bool', 'parser'=>'XMLParser'],
'xml_parser_get_option' => ['string', 'parser'=>'XMLParser', 'option'=>'int'],
'xml_parser_set_option' => ['bool', 'parser'=>'XMLParser', 'option'=>'int', 'value'=>'mixed'],
'xml_set_character_data_handler' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_default_handler' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_element_handler' => ['bool', 'parser'=>'XMLParser', 'start_handler'=>'callable', 'end_handler'=>'callable'],
'xml_set_end_namespace_decl_handler' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_external_entity_ref_handler' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_notation_decl_handler' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_object' => ['bool', 'parser'=>'XMLParser', 'object'=>'object'],
'xml_set_processing_instruction_handler' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_start_namespace_decl_handler' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_unparsed_entity_decl_handler' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_character_data_handler' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_default_handler' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_element_handler' => ['true', 'parser'=>'XMLParser', 'start_handler'=>'callable', 'end_handler'=>'callable'],
'xml_set_end_namespace_decl_handler' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_external_entity_ref_handler' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_notation_decl_handler' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_object' => ['true', 'parser'=>'XMLParser', 'object'=>'object'],
'xml_set_processing_instruction_handler' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_start_namespace_decl_handler' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
'xml_set_unparsed_entity_decl_handler' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
'XMLDiff\Base::__construct' => ['void', 'nsname'=>'string'],
'XMLDiff\Base::diff' => ['mixed', 'from'=>'mixed', 'to'=>'mixed'],
'XMLDiff\Base::merge' => ['mixed', 'src'=>'mixed', 'diff'=>'mixed'],
Expand Down
40 changes: 20 additions & 20 deletions dictionaries/CallMap_80_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -2390,44 +2390,44 @@
'new' => ['bool', 'parser'=>'XMLParser', 'option'=>'int', 'value'=>'mixed'],
],
'xml_set_character_data_handler' => [
'old' => ['bool', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'old' => ['true', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
],
'xml_set_default_handler' => [
'old' => ['bool', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'old' => ['true', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
],
'xml_set_element_handler' => [
'old' => ['bool', 'parser'=>'resource', 'start_handler'=>'callable', 'end_handler'=>'callable'],
'new' => ['bool', 'parser'=>'XMLParser', 'start_handler'=>'callable', 'end_handler'=>'callable'],
'old' => ['true', 'parser'=>'resource', 'start_handler'=>'callable', 'end_handler'=>'callable'],
'new' => ['true', 'parser'=>'XMLParser', 'start_handler'=>'callable', 'end_handler'=>'callable'],
],
'xml_set_end_namespace_decl_handler' => [
'old' => ['bool', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'old' => ['true', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
],
'xml_set_external_entity_ref_handler' => [
'old' => ['bool', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'old' => ['true', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
],
'xml_set_notation_decl_handler' => [
'old' => ['bool', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'old' => ['true', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
],
'xml_set_object' => [
'old' => ['bool', 'parser'=>'resource', 'object'=>'object'],
'new' => ['bool', 'parser'=>'XMLParser', 'object'=>'object'],
'old' => ['true', 'parser'=>'resource', 'object'=>'object'],
'new' => ['true', 'parser'=>'XMLParser', 'object'=>'object'],
],
'xml_set_processing_instruction_handler' => [
'old' => ['bool', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'old' => ['true', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
],
'xml_set_start_namespace_decl_handler' => [
'old' => ['bool', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'old' => ['true', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
],
'xml_set_unparsed_entity_decl_handler' => [
'old' => ['bool', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['bool', 'parser'=>'XMLParser', 'handler'=>'callable'],
'old' => ['true', 'parser'=>'resource', 'handler'=>'callable'],
'new' => ['true', 'parser'=>'XMLParser', 'handler'=>'callable'],
],
'xmlwriter_end_attribute' => [
'old' => ['bool', 'writer'=>'resource'],
Expand Down
10 changes: 9 additions & 1 deletion dictionaries/CallMap_82_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
return [
'added' => [
'mysqli_execute_query' => ['mysqli_result|bool', 'mysqli'=>'mysqli', 'query'=>'non-empty-string', 'params='=>'list<mixed>|null'],
'mysqli_execute_query' => ['mysqli_result|bool', 'mysql'=>'mysqli', 'query'=>'non-empty-string', 'params='=>'list<mixed>|null'],
'mysqli::execute_query' => ['mysqli_result|bool', 'query'=>'non-empty-string', 'params='=>'list<mixed>|null'],
'openssl_cipher_key_length' => ['positive-int|false', 'cipher_algo'=>'non-empty-string'],
'curl_upkeep' => ['bool', 'handle'=>'CurlHandle'],
Expand All @@ -33,6 +33,14 @@
],

'changed' => [
'dba_open' => [
'old' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'string', '...handler_params='=>'string'],
'new' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'?string', 'permission='=>'int', 'map_size='=>'int', 'flags='=>'?int'],
],
'dba_popen' => [
'old' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'string', '...handler_params='=>'string'],
'new' => ['resource', 'path'=>'string', 'mode'=>'string', 'handler='=>'?string', 'permission='=>'int', 'map_size='=>'int', 'flags='=>'?int'],
],
'str_split' => [
'old' => ['non-empty-list<string>', 'string'=>'string', 'length='=>'positive-int'],
'new' => ['list<string>', 'string'=>'string', 'length='=>'positive-int'],
Expand Down

0 comments on commit f86c65c

Please sign in to comment.