Skip to content

Commit cdfeaaa

Browse files
committed
Normalize callmap
1 parent 986ef8d commit cdfeaaa

10 files changed

+188147
-36509
lines changed

dictionaries/CallMap.php

+84,186-15,815
Large diffs are not rendered by default.

dictionaries/CallMap_71_delta.php

+249-78
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,251 @@
11
<?php // phpcs:ignoreFile
22

3-
/**
4-
* This contains the information needed to convert the function signatures for php 7.1 to php 7.0 (and vice versa)
5-
*
6-
* This file has three sections.
7-
* The 'added' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that did not exist prior to PHP 7.1
8-
* The 'removed' section contains the signatures that were removed in php 7.1.
9-
* The 'changed' section contains functions for which the signature has changed for php 7.1.
10-
* Each function in the 'changed' section has an 'old' and a 'new' section,
11-
* representing the function as it was in PHP before 7.1 and in PHP 7.1, respectively
12-
*
13-
* @see CallMap.php
14-
*
15-
* @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
16-
*/
17-
return [
18-
'added' => [
19-
'Closure::fromCallable' => ['Closure', 'callback'=>'callable'],
20-
'curl_multi_errno' => ['int|false', 'mh'=>'resource'],
21-
'curl_share_errno' => ['int|false', 'sh'=>'resource'],
22-
'curl_share_strerror' => ['?string', 'error_code'=>'int'],
23-
'getenv\'1' => ['array<string,string>'],
24-
'hash_hkdf' => ['non-empty-string|false', 'algo'=>'string', 'key'=>'string', 'length='=>'int', 'info='=>'string', 'salt='=>'string'],
25-
'is_iterable' => ['bool', 'value'=>'mixed'],
26-
'openssl_get_curve_names' => ['list<string>'],
27-
'pcntl_async_signals' => ['bool', 'enable='=>'bool'],
28-
'pcntl_signal_get_handler' => ['int|string', 'signal'=>'int'],
29-
'sapi_windows_cp_conv' => ['?string', 'in_codepage'=>'int|string', 'out_codepage'=>'int|string', 'subject'=>'string'],
30-
'sapi_windows_cp_get' => ['int', 'kind='=>'string'],
31-
'sapi_windows_cp_is_utf8' => ['bool'],
32-
'sapi_windows_cp_set' => ['bool', 'codepage'=>'int'],
33-
'session_create_id' => ['string|false', 'prefix='=>'string'],
34-
'session_gc' => ['int|false'],
35-
],
36-
'changed' => [
37-
'DateTimeZone::listIdentifiers' => [
38-
'old' => ['list<string>|false', 'timezoneGroup='=>'int', 'countryCode='=>'string'],
39-
'new' => ['list<string>|false', 'timezoneGroup='=>'int', 'countryCode='=>'string|null'],
40-
],
41-
'IntlDateFormatter::format' => [
42-
'old' => ['string|false', 'value'=>'IntlCalendar|DateTime|array{0: int, 1: int, 2: int, 3: int, 4: int, 5: int, 6: int, 7: int, 8: int}|array{tm_sec: int, tm_min: int, tm_hour: int, tm_mday: int, tm_mon: int, tm_year: int, tm_wday: int, tm_yday: int, tm_isdst: int}|string|int|float'],
43-
'new' => ['string|false', 'value'=>'IntlCalendar|DateTimeInterface|array{0: int, 1: int, 2: int, 3: int, 4: int, 5: int, 6: int, 7: int, 8: int}|array{tm_sec: int, tm_min: int, tm_hour: int, tm_mday: int, tm_mon: int, tm_year: int, tm_wday: int, tm_yday: int, tm_isdst: int}|string|int|float'],
44-
],
45-
'SessionHandler::gc' => [
46-
'old' => ['bool', 'max_lifetime'=>'int'],
47-
'new' => ['int|false', 'max_lifetime'=>'int'],
48-
],
49-
'SQLite3::createFunction' => [
50-
'old' => ['bool', 'name'=>'string', 'callback'=>'callable', 'argCount='=>'int'],
51-
'new' => ['bool', 'name'=>'string', 'callback'=>'callable', 'argCount='=>'int', 'flags='=>'int'],
52-
],
53-
'get_headers' => [
54-
'old' => ['array|false', 'url'=>'string', 'associative='=>'int'],
55-
'new' => ['array|false', 'url'=>'string', 'associative='=>'int', 'context='=>'?resource'],
56-
],
57-
'getopt' => [
58-
'old' => ['array<string,string|false|list<string|false>>|false', 'short_options'=>'string', 'long_options='=>'array'],
59-
'new' => ['array<string,string|false|list<string|false>>|false', 'short_options'=>'string', 'long_options='=>'array', '&w_rest_index='=>'int'],
60-
],
61-
'pg_fetch_all' => [
62-
'old' => ['array<array>', 'result'=>'resource'],
63-
'new' => ['array<array>', 'result'=>'resource', 'mode='=>'int'],
64-
],
65-
'pg_select' => [
66-
'old' => ['string|array|false', 'connection'=>'resource', 'table_name'=>'string', 'conditions'=>'array', 'flags='=>'int'],
67-
'new' => ['string|array|false', 'connection'=>'resource', 'table_name'=>'string', 'conditions'=>'array', 'flags='=>'int', 'mode='=>'int'],
68-
],
69-
'timezone_identifiers_list' => [
70-
'old' => ['list<string>|false', 'timezoneGroup='=>'int', 'countryCode='=>'string'],
71-
'new' => ['list<string>|false', 'timezoneGroup='=>'int', 'countryCode='=>'?string'],
72-
],
73-
'unpack' => [
74-
'old' => ['array', 'format'=>'string', 'string'=>'string'],
75-
'new' => ['array|false', 'format'=>'string', 'string'=>'string', 'offset='=>'int'],
76-
],
77-
],
78-
'removed' => [
79-
],
80-
];
3+
return array (
4+
'added' =>
5+
array (
6+
'Closure::fromCallable' =>
7+
array (
8+
0 => 'Closure',
9+
'callback' => 'callable',
10+
),
11+
'curl_multi_errno' =>
12+
array (
13+
0 => 'false|int',
14+
'mh' => 'resource',
15+
),
16+
'curl_share_errno' =>
17+
array (
18+
0 => 'false|int',
19+
'sh' => 'resource',
20+
),
21+
'curl_share_strerror' =>
22+
array (
23+
0 => 'null|string',
24+
'error_code' => 'int',
25+
),
26+
'getenv\'1' =>
27+
array (
28+
0 => 'array<string, string>',
29+
),
30+
'hash_hkdf' =>
31+
array (
32+
0 => 'false|non-empty-string',
33+
'algo' => 'string',
34+
'key' => 'string',
35+
'length=' => 'int',
36+
'info=' => 'string',
37+
'salt=' => 'string',
38+
),
39+
'is_iterable' =>
40+
array (
41+
0 => 'bool',
42+
'value' => 'mixed',
43+
),
44+
'openssl_get_curve_names' =>
45+
array (
46+
0 => 'list<string>',
47+
),
48+
'pcntl_async_signals' =>
49+
array (
50+
0 => 'bool',
51+
'enable=' => 'bool',
52+
),
53+
'pcntl_signal_get_handler' =>
54+
array (
55+
0 => 'int|string',
56+
'signal' => 'int',
57+
),
58+
'sapi_windows_cp_conv' =>
59+
array (
60+
0 => 'null|string',
61+
'in_codepage' => 'int|string',
62+
'out_codepage' => 'int|string',
63+
'subject' => 'string',
64+
),
65+
'sapi_windows_cp_get' =>
66+
array (
67+
0 => 'int',
68+
'kind=' => 'string',
69+
),
70+
'sapi_windows_cp_is_utf8' =>
71+
array (
72+
0 => 'bool',
73+
),
74+
'sapi_windows_cp_set' =>
75+
array (
76+
0 => 'bool',
77+
'codepage' => 'int',
78+
),
79+
'session_create_id' =>
80+
array (
81+
0 => 'false|string',
82+
'prefix=' => 'string',
83+
),
84+
'session_gc' =>
85+
array (
86+
0 => 'false|int',
87+
),
88+
),
89+
'changed' =>
90+
array (
91+
'DateTimeZone::listIdentifiers' =>
92+
array (
93+
'old' =>
94+
array (
95+
0 => 'false|list<string>',
96+
'timezoneGroup=' => 'int',
97+
'countryCode=' => 'string',
98+
),
99+
'new' =>
100+
array (
101+
0 => 'false|list<string>',
102+
'timezoneGroup=' => 'int',
103+
'countryCode=' => 'null|string',
104+
),
105+
),
106+
'IntlDateFormatter::format' =>
107+
array (
108+
'old' =>
109+
array (
110+
0 => 'false|string',
111+
'value' => 'DateTime|IntlCalendar|array{0?: int, 1?: int, 2?: int, 3?: int, 4?: int, 5?: int, 6?: int, 7?: int, 8?: int, tm_hour?: int, tm_isdst?: int, tm_mday?: int, tm_min?: int, tm_mon?: int, tm_sec?: int, tm_wday?: int, tm_yday?: int, tm_year?: int}|float|int|string',
112+
),
113+
'new' =>
114+
array (
115+
0 => 'false|string',
116+
'value' => 'DateTimeInterface|IntlCalendar|array{0?: int, 1?: int, 2?: int, 3?: int, 4?: int, 5?: int, 6?: int, 7?: int, 8?: int, tm_hour?: int, tm_isdst?: int, tm_mday?: int, tm_min?: int, tm_mon?: int, tm_sec?: int, tm_wday?: int, tm_yday?: int, tm_year?: int}|float|int|string',
117+
),
118+
),
119+
'SessionHandler::gc' =>
120+
array (
121+
'old' =>
122+
array (
123+
0 => 'bool',
124+
'max_lifetime' => 'int',
125+
),
126+
'new' =>
127+
array (
128+
0 => 'false|int',
129+
'max_lifetime' => 'int',
130+
),
131+
),
132+
'SQLite3::createFunction' =>
133+
array (
134+
'old' =>
135+
array (
136+
0 => 'bool',
137+
'name' => 'string',
138+
'callback' => 'callable',
139+
'argCount=' => 'int',
140+
),
141+
'new' =>
142+
array (
143+
0 => 'bool',
144+
'name' => 'string',
145+
'callback' => 'callable',
146+
'argCount=' => 'int',
147+
'flags=' => 'int',
148+
),
149+
),
150+
'get_headers' =>
151+
array (
152+
'old' =>
153+
array (
154+
0 => 'array<array-key, mixed>|false',
155+
'url' => 'string',
156+
'associative=' => 'int',
157+
),
158+
'new' =>
159+
array (
160+
0 => 'array<array-key, mixed>|false',
161+
'url' => 'string',
162+
'associative=' => 'int',
163+
'context=' => 'null|resource',
164+
),
165+
),
166+
'getopt' =>
167+
array (
168+
'old' =>
169+
array (
170+
0 => 'array<string, false|list<false|string>|string>|false',
171+
'short_options' => 'string',
172+
'long_options=' => 'array<array-key, mixed>',
173+
),
174+
'new' =>
175+
array (
176+
0 => 'array<string, false|list<false|string>|string>|false',
177+
'short_options' => 'string',
178+
'long_options=' => 'array<array-key, mixed>',
179+
'&w_rest_index=' => 'int',
180+
),
181+
),
182+
'pg_fetch_all' =>
183+
array (
184+
'old' =>
185+
array (
186+
0 => 'array<array-key, array<array-key, mixed>>',
187+
'result' => 'resource',
188+
),
189+
'new' =>
190+
array (
191+
0 => 'array<array-key, array<array-key, mixed>>',
192+
'result' => 'resource',
193+
'mode=' => 'int',
194+
),
195+
),
196+
'pg_select' =>
197+
array (
198+
'old' =>
199+
array (
200+
0 => 'array<array-key, mixed>|false|string',
201+
'connection' => 'resource',
202+
'table_name' => 'string',
203+
'conditions' => 'array<array-key, mixed>',
204+
'flags=' => 'int',
205+
),
206+
'new' =>
207+
array (
208+
0 => 'array<array-key, mixed>|false|string',
209+
'connection' => 'resource',
210+
'table_name' => 'string',
211+
'conditions' => 'array<array-key, mixed>',
212+
'flags=' => 'int',
213+
'mode=' => 'int',
214+
),
215+
),
216+
'timezone_identifiers_list' =>
217+
array (
218+
'old' =>
219+
array (
220+
0 => 'false|list<string>',
221+
'timezoneGroup=' => 'int',
222+
'countryCode=' => 'string',
223+
),
224+
'new' =>
225+
array (
226+
0 => 'false|list<string>',
227+
'timezoneGroup=' => 'int',
228+
'countryCode=' => 'null|string',
229+
),
230+
),
231+
'unpack' =>
232+
array (
233+
'old' =>
234+
array (
235+
0 => 'array<array-key, mixed>',
236+
'format' => 'string',
237+
'string' => 'string',
238+
),
239+
'new' =>
240+
array (
241+
0 => 'array<array-key, mixed>|false',
242+
'format' => 'string',
243+
'string' => 'string',
244+
'offset=' => 'int',
245+
),
246+
),
247+
),
248+
'removed' =>
249+
array (
250+
),
251+
);

0 commit comments

Comments
 (0)