Skip to content

Commit

Permalink
start making curl types more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Oct 23, 2024
1 parent 0f796f1 commit c6bc1e6
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 51 deletions.
30 changes: 15 additions & 15 deletions dictionaries/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1255,37 +1255,37 @@
'cubrid_version' => ['string'],
'curl_close' => ['void', 'handle'=>'CurlHandle'],
'curl_copy_handle' => ['CurlHandle|false', 'handle'=>'CurlHandle'],
'curl_errno' => ['int', 'handle'=>'CurlHandle'],
'curl_errno' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97', 'handle'=>'CurlHandle'],
'curl_error' => ['string', 'handle'=>'CurlHandle'],
'curl_escape' => ['string|false', 'handle'=>'CurlHandle', 'string'=>'string'],
'curl_exec' => ['bool|string', 'handle'=>'CurlHandle'],
'curl_file_create' => ['CURLFile', 'filename'=>'string', 'mime_type='=>'string|null', 'posted_filename='=>'string|null'],
'curl_getinfo' => ['mixed', 'handle'=>'CurlHandle', 'option='=>'?int'],
'curl_init' => ['CurlHandle|false', 'url='=>'?string'],
'curl_multi_add_handle' => ['int', 'multi_handle'=>'CurlMultiHandle', 'handle'=>'CurlHandle'],
'curl_multi_add_handle' => ['int<0, 12>', 'multi_handle'=>'CurlMultiHandle', 'handle'=>'CurlHandle'],
'curl_multi_close' => ['void', 'multi_handle'=>'CurlMultiHandle'],
'curl_multi_errno' => ['int', 'multi_handle'=>'CurlMultiHandle'],
'curl_multi_exec' => ['int', 'multi_handle'=>'CurlMultiHandle', '&w_still_running'=>'int'],
'curl_multi_errno' => ['int<0, 12>', 'multi_handle'=>'CurlMultiHandle'],
'curl_multi_exec' => ['0|3|4', 'multi_handle'=>'CurlMultiHandle', '&w_still_running'=>'int<0, max>'],
'curl_multi_getcontent' => ['string', 'handle'=>'CurlHandle'],
'curl_multi_info_read' => ['array|false', 'multi_handle'=>'CurlMultiHandle', '&w_queued_messages='=>'int'],
'curl_multi_info_read' => ['array{msg: 1, result: 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97, handle: CurlHandle}|false', 'multi_handle'=>'CurlMultiHandle', '&w_queued_messages='=>'int<0, max>'],
'curl_multi_init' => ['CurlMultiHandle'],
'curl_multi_remove_handle' => ['int', 'multi_handle'=>'CurlMultiHandle', 'handle'=>'CurlHandle'],
'curl_multi_select' => ['int', 'multi_handle'=>'CurlMultiHandle', 'timeout='=>'float'],
'curl_multi_setopt' => ['bool', 'multi_handle'=>'CurlMultiHandle', 'option'=>'int', 'value'=>'mixed'],
'curl_multi_strerror' => ['?string', 'error_code'=>'int'],
'curl_pause' => ['int', 'handle'=>'CurlHandle', 'flags'=>'int'],
'curl_multi_remove_handle' => ['0|1|2|3|4', 'multi_handle'=>'CurlMultiHandle', 'handle'=>'CurlHandle'],
'curl_multi_select' => ['int<-1, max>', 'multi_handle'=>'CurlMultiHandle', 'timeout='=>'float'],
'curl_multi_setopt' => ['bool', 'multi_handle'=>'CurlMultiHandle', 'option'=>'3|6|7|8|13|16|20014|30009|30010', 'value'=>'int<0, max>|callable'],
'curl_multi_strerror' => ['?string', 'error_code'=>'int<0, 12>'],
'curl_pause' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97', 'handle'=>'CurlHandle', 'flags'=>'0|1|4|5'],
'curl_reset' => ['void', 'handle'=>'CurlHandle'],
'curl_setopt' => ['bool', 'handle'=>'CurlHandle', 'option'=>'int', 'value'=>'callable|mixed'],
'curl_setopt_array' => ['bool', 'handle'=>'CurlHandle', 'options'=>'array'],
'curl_share_close' => ['void', 'share_handle'=>'CurlShareHandle'],
'curl_share_errno' => ['int', 'share_handle'=>'CurlShareHandle'],
'curl_share_errno' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97', 'share_handle'=>'CurlShareHandle'],
'curl_share_init' => ['CurlShareHandle'],
'curl_share_setopt' => ['bool', 'share_handle'=>'CurlShareHandle', 'option'=>'int', 'value'=>'mixed'],
'curl_share_strerror' => ['?string', 'error_code'=>'int'],
'curl_strerror' => ['?string', 'error_code'=>'int'],
'curl_share_setopt' => ['bool', 'share_handle'=>'CurlShareHandle', 'option'=>'1|2', 'value'=>'2|3|4|5|6'],
'curl_share_strerror' => ['?string', 'error_code'=>'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97'],
'curl_strerror' => ['?string', 'error_code'=>'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97'],
'curl_upkeep' => ['bool', 'handle'=>'CurlHandle'],
'curl_unescape' => ['string|false', 'handle'=>'CurlHandle', 'string'=>'string'],
'curl_version' => ['array', 'version='=>'int'],
'curl_version' => ['array'],
'CURLFile::__construct' => ['void', 'filename'=>'string', 'mime_type='=>'?string', 'posted_filename='=>'?string'],
'CURLFile::getFilename' => ['string'],
'CURLFile::getMimeType' => ['string'],
Expand Down
10 changes: 7 additions & 3 deletions dictionaries/CallMap_71_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
return [
'added' => [
'Closure::fromCallable' => ['Closure', 'callback'=>'callable'],
'curl_multi_errno' => ['int|false', 'mh'=>'resource'],
'curl_share_errno' => ['int|false', 'sh'=>'resource'],
'curl_share_strerror' => ['?string', 'error_code'=>'int'],
'curl_multi_errno' => ['int<0, 12>|false', 'mh'=>'resource'],
'curl_share_errno' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|false', 'sh'=>'resource'],
'curl_share_strerror' => ['?string', 'error_code'=>'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90'],
'getenv\'1' => ['array<string,string>'],
'hash_hkdf' => ['non-empty-string|false', 'algo'=>'string', 'key'=>'string', 'length='=>'int', 'info='=>'string', 'salt='=>'string'],
'is_iterable' => ['bool', 'value'=>'mixed'],
Expand Down Expand Up @@ -50,6 +50,10 @@
'old' => ['bool', 'name'=>'string', 'callback'=>'callable', 'argCount='=>'int'],
'new' => ['bool', 'name'=>'string', 'callback'=>'callable', 'argCount='=>'int', 'flags='=>'int'],
],
'curl_multi_setopt' => [
'old' => ['bool', 'mh'=>'resource', 'option'=>'3|6', 'value'=>'int<0, max>'],
'new' => ['bool', 'mh'=>'resource', 'option'=>'3|6|7|8|13|16|20014|30009|30010', 'value'=>'int<0, max>|callable'],
],
'get_headers' => [
'old' => ['array|false', 'url'=>'string', 'associative='=>'int'],
'new' => ['array|false', 'url'=>'string', 'associative='=>'int', 'context='=>'?resource'],
Expand Down
8 changes: 8 additions & 0 deletions dictionaries/CallMap_73_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
'old' => ['int', 'scale'=>'int'],
'new' => ['int', 'scale='=>'int'],
],
'curl_version' => [
'old' => ['array', 'age='=>'int'],
'new' => ['array'],
],
'curl_share_setopt' => [
'old' => ['bool', 'sh'=>'resource', 'option'=>'1|2', 'value'=>'2|3|4'],
'new' => ['bool', 'sh'=>'resource', 'option'=>'1|2', 'value'=>'2|3|4|5|6'],
],
'define' => [
'old' => ['bool', 'constant_name'=>'string', 'value'=>'array|scalar|null', 'case_insensitive='=>'bool'],
'new' => ['bool', 'constant_name'=>'string', 'value'=>'array|scalar|null', 'case_insensitive='=>'false'],
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 @@ -676,8 +676,8 @@
'new' => ['CurlHandle|false', 'handle'=>'CurlHandle'],
],
'curl_errno' => [
'old' => ['int', 'ch'=>'resource'],
'new' => ['int', 'handle'=>'CurlHandle'],
'old' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90', 'ch'=>'resource'],
'new' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90', 'handle'=>'CurlHandle'],
],
'curl_error' => [
'old' => ['string', 'ch'=>'resource'],
Expand All @@ -704,48 +704,48 @@
'new' => ['CurlHandle|false', 'url='=>'?string'],
],
'curl_multi_add_handle' => [
'old' => ['int', 'mh'=>'resource', 'ch'=>'resource'],
'new' => ['int', 'multi_handle'=>'CurlMultiHandle', 'handle'=>'CurlHandle'],
'old' => ['int<0, 12>', 'mh'=>'resource', 'ch'=>'resource'],
'new' => ['int<0, 12>', 'multi_handle'=>'CurlMultiHandle', 'handle'=>'CurlHandle'],
],
'curl_multi_close' => [
'old' => ['void', 'mh'=>'resource'],
'new' => ['void', 'multi_handle'=>'CurlMultiHandle'],
],
'curl_multi_errno' => [
'old' => ['int|false', 'mh'=>'resource'],
'new' => ['int', 'multi_handle'=>'CurlMultiHandle'],
'old' => ['int<0, 12>|false', 'mh'=>'resource'],
'new' => ['int<0, 12>', 'multi_handle'=>'CurlMultiHandle'],
],
'curl_multi_exec' => [
'old' => ['int', 'mh'=>'resource', '&w_still_running'=>'int'],
'new' => ['int', 'multi_handle'=>'CurlMultiHandle', '&w_still_running'=>'int'],
'old' => ['0|3|4', 'mh'=>'resource', '&w_still_running'=>'int<0, max>'],
'new' => ['0|3|4', 'multi_handle'=>'CurlMultiHandle', '&w_still_running'=>'int<0, max>'],
],
'curl_multi_getcontent' => [
'old' => ['string', 'ch'=>'resource'],
'new' => ['string', 'handle'=>'CurlHandle'],
],
'curl_multi_info_read' => [
'old' => ['array|false', 'mh'=>'resource', '&w_msgs_in_queue='=>'int'],
'new' => ['array|false', 'multi_handle'=>'CurlMultiHandle', '&w_queued_messages='=>'int'],
'old' => ['array{msg: 1, result: 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90, handle: resource}|false', 'mh'=>'resource', '&w_msgs_in_queue='=>'int<0, max>'],
'new' => ['array{msg: 1, result: 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90, handle: CurlHandle}|false', 'multi_handle'=>'CurlMultiHandle', '&w_queued_messages='=>'int<0, max>'],
],
'curl_multi_init' => [
'old' => ['resource'],
'new' => ['CurlMultiHandle'],
],
'curl_multi_remove_handle' => [
'old' => ['int', 'mh'=>'resource', 'ch'=>'resource'],
'new' => ['int', 'multi_handle'=>'CurlMultiHandle', 'handle'=>'CurlHandle'],
'old' => ['0|1|2|3|4', 'mh'=>'resource', 'ch'=>'resource'],
'new' => ['0|1|2|3|4', 'multi_handle'=>'CurlMultiHandle', 'handle'=>'CurlHandle'],
],
'curl_multi_select' => [
'old' => ['int', 'mh'=>'resource', 'timeout='=>'float'],
'new' => ['int', 'multi_handle'=>'CurlMultiHandle', 'timeout='=>'float'],
'old' => ['int<-1, max>', 'mh'=>'resource', 'timeout='=>'float'],
'new' => ['int<-1, max>', 'multi_handle'=>'CurlMultiHandle', 'timeout='=>'float'],
],
'curl_multi_setopt' => [
'old' => ['bool', 'mh'=>'resource', 'option'=>'int', 'value'=>'mixed'],
'new' => ['bool', 'multi_handle'=>'CurlMultiHandle', 'option'=>'int', 'value'=>'mixed'],
'old' => ['bool', 'mh'=>'resource', 'option'=>'3|6|7|8|13|16|20014|30009|30010', 'value'=>'int<0, max>|callable'],
'new' => ['bool', 'multi_handle'=>'CurlMultiHandle', 'option'=>'3|6|7|8|13|16|20014|30009|30010', 'value'=>'int<0, max>|callable'],
],
'curl_pause' => [
'old' => ['int', 'ch'=>'resource', 'bitmask'=>'int'],
'new' => ['int', 'handle'=>'CurlHandle', 'flags'=>'int'],
'old' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90', 'ch'=>'resource', 'bitmask'=>'0|1|4|5'],
'new' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90', 'handle'=>'CurlHandle', 'flags'=>'0|1|4|5'],
],
'curl_reset' => [
'old' => ['void', 'ch'=>'resource'],
Expand All @@ -772,8 +772,8 @@
'new' => ['CurlShareHandle'],
],
'curl_share_setopt' => [
'old' => ['bool', 'sh'=>'resource', 'option'=>'int', 'value'=>'mixed'],
'new' => ['bool', 'share_handle'=>'CurlShareHandle', 'option'=>'int', 'value'=>'mixed'],
'old' => ['bool', 'sh'=>'resource', 'option'=>'1|2', 'value'=>'2|3|4|5|6'],
'new' => ['bool', 'share_handle'=>'CurlShareHandle', 'option'=>'1|2', 'value'=>'2|3|4|5|6'],
],
'curl_unescape' => [
'old' => ['string|false', 'ch'=>'resource', 'string'=>'string'],
Expand Down
23 changes: 23 additions & 0 deletions dictionaries/CallMap_82_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,29 @@
],

'changed' => [
'curl_errno' => [
'old' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90', 'handle'=>'CurlHandle'],
'new' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97', 'handle'=>'CurlHandle'],
],
'curl_multi_info_read' => [
'old' => ['array{msg: 1, result: 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90, handle: CurlHandle}|false', 'multi_handle'=>'CurlMultiHandle', '&w_queued_messages='=>'int<0, max>'],
'new' => ['array{msg: 1, result: 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97, handle: CurlHandle}|false', 'multi_handle'=>'CurlMultiHandle', '&w_queued_messages='=>'int<0, max>'],
],
'curl_pause' => [
'old' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90', 'handle'=>'CurlHandle', 'flags'=>'0|1|4|5'],
'new' => ['0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97', 'handle'=>'CurlHandle', 'flags'=>'0|1|4|5'],
],
'curl_share_strerror' => [
'old' => ['?string', 'error_code'=>'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90'],
'new' => ['?string', 'error_code'=>'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97'],
],
'curl_strerror' => [
'old' => ['?string', 'error_code'=>'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90'],
'new' => ['?string', 'error_code'=>'0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|52|53|54|55|56|57|58|59|60|61|62|63|64|77|79|90|97'],
],



'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'],
Expand Down
1 change: 0 additions & 1 deletion dictionaries/CallMap_83_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
'added' => [
'json_validate' => ['bool', 'json'=>'string', 'depth='=>'positive-int', 'flags='=>'int'],
],

'changed' => [
'gc_status' => [
'old' => ['array{runs:int,collected:int,threshold:int,roots:int}'],
Expand Down
Loading

0 comments on commit c6bc1e6

Please sign in to comment.