Skip to content

Commit ef9a06c

Browse files
authored
Merge pull request #9526 from othercorey/cleanup-unreflectable
Clean up unreflectable callmap methods
2 parents 7bdb2d6 + 6dfaafd commit ef9a06c

File tree

4 files changed

+14
-81
lines changed

4 files changed

+14
-81
lines changed

dictionaries/CallMap.php

+2-27
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,6 @@
12931293
'curl_unescape' => ['string|false', 'handle'=>'CurlHandle', 'string'=>'string'],
12941294
'curl_version' => ['array', 'version='=>'int'],
12951295
'CURLFile::__construct' => ['void', 'filename'=>'string', 'mime_type='=>'?string', 'posted_filename='=>'?string'],
1296-
'CURLFile::__wakeup' => ['void'],
12971296
'CURLFile::getFilename' => ['string'],
12981297
'CURLFile::getMimeType' => ['string'],
12991298
'CURLFile::getPostFilename' => ['string'],
@@ -3159,7 +3158,6 @@
31593158
'Gender\Gender::get' => ['int', 'name'=>'string', 'country='=>'int'],
31603159
'Gender\Gender::isNick' => ['array', 'name0'=>'string', 'name1'=>'string', 'country='=>'int'],
31613160
'Gender\Gender::similarNames' => ['array', 'name'=>'string', 'country='=>'int'],
3162-
'Generator::__wakeup' => ['void'],
31633161
'Generator::current' => ['mixed'],
31643162
'Generator::getReturn' => ['mixed'],
31653163
'Generator::key' => ['mixed'],
@@ -3555,9 +3553,7 @@
35553553
'GmagickPixel::setcolorvalue' => ['GmagickPixel', 'color'=>'int', 'value'=>'float'],
35563554
'gmdate' => ['string', 'format'=>'string', 'timestamp='=>'int|null'],
35573555
'gmmktime' => ['int|false', 'hour'=>'int', 'minute='=>'int|null', 'second='=>'int|null', 'month='=>'int|null', 'day='=>'int|null', 'year='=>'int|null'],
3558-
'GMP::__construct' => ['void'],
35593556
'GMP::__serialize' => ['array'],
3560-
'GMP::__toString' => ['numeric-string'],
35613557
'GMP::__unserialize' => ['void', 'data'=>'array'],
35623558
'gmp_abs' => ['GMP', 'num'=>'GMP|string|int'],
35633559
'gmp_add' => ['GMP', 'num1'=>'GMP|string|int', 'num2'=>'GMP|string|int'],
@@ -7811,7 +7807,6 @@
78117807
'mysqli::commit' => ['bool', 'flags='=>'int', 'name='=>'?string'],
78127808
'mysqli::connect' => ['bool', 'hostname='=>'string|null', 'username='=>'string|null', 'password='=>'string|null', 'database='=>'string|null', 'port='=>'int|null', 'socket='=>'string|null'],
78137809
'mysqli::debug' => ['bool', 'options'=>'string'],
7814-
'mysqli::disable_reads_from_master' => ['bool'],
78157810
'mysqli::dump_debug_info' => ['bool'],
78167811
'mysqli::escape_string' => ['string', 'string'=>'string'],
78177812
'mysqli::execute_query' => ['mysqli_result|bool', 'query'=>'non-empty-string', 'params='=>'list<mixed>|null'],
@@ -7836,13 +7831,9 @@
78367831
'mysqli::refresh' => ['bool', 'flags'=>'int'],
78377832
'mysqli::release_savepoint' => ['bool', 'name'=>'string'],
78387833
'mysqli::rollback' => ['bool', 'flags='=>'int', 'name='=>'?string'],
7839-
'mysqli::rpl_query_type' => ['int', 'query'=>'string'],
78407834
'mysqli::savepoint' => ['bool', 'name'=>'string'],
78417835
'mysqli::select_db' => ['bool', 'database'=>'string'],
7842-
'mysqli::send_query' => ['bool', 'query'=>'string'],
78437836
'mysqli::set_charset' => ['bool', 'charset'=>'string'],
7844-
'mysqli::set_local_infile_default' => ['void'],
7845-
'mysqli::set_local_infile_handler' => ['bool', 'read_func='=>'callable'],
78467837
'mysqli::set_opt' => ['bool', 'option'=>'int', 'value'=>'string|int'],
78477838
'mysqli::ssl_set' => ['bool', 'key'=>'?string', 'certificate'=>'?string', 'ca_certificate'=>'?string', 'ca_path'=>'?string', 'cipher_algos'=>'?string'],
78487839
'mysqli::stat' => ['string|false'],
@@ -7864,8 +7855,6 @@
78647855
'mysqli_debug' => ['true', 'options'=>'string'],
78657856
'mysqli_disable_reads_from_master' => ['bool', 'link'=>'mysqli'],
78667857
'mysqli_disable_rpl_parse' => ['bool', 'link'=>'mysqli'],
7867-
'mysqli_driver::embedded_server_end' => ['void'],
7868-
'mysqli_driver::embedded_server_start' => ['bool', 'start'=>'int', 'arguments'=>'array', 'groups'=>'array'],
78697858
'mysqli_dump_debug_info' => ['bool', 'mysql'=>'mysqli'],
78707859
'mysqli_embedded_server_end' => ['void'],
78717860
'mysqli_embedded_server_start' => ['bool', 'start'=>'int', 'arguments'=>'array', 'groups'=>'array'],
@@ -8998,8 +8987,6 @@
89988987
'PDFlib::utf32_to_utf16' => ['string', 'utf32string'=>'string', 'ordering'=>'string'],
89998988
'PDFlib::utf8_to_utf16' => ['string', 'utf8string'=>'string', 'ordering'=>'string'],
90008989
'PDO::__construct' => ['void', 'dsn'=>'string', 'username='=>'?string', 'password='=>'?string', 'options='=>'?array'],
9001-
'PDO::__sleep' => ['list<string>'],
9002-
'PDO::__wakeup' => ['void'],
90038990
'PDO::beginTransaction' => ['bool'],
90048991
'PDO::commit' => ['bool'],
90058992
'PDO::cubrid_schema' => ['array', 'schema_type'=>'int', 'table_name='=>'string', 'col_name='=>'string'],
@@ -9038,8 +9025,6 @@
90389025
'PDOException::getPrevious' => ['?Throwable'],
90399026
'PDOException::getTrace' => ['list<array{file?:string,line?:int,function:string,class?:class-string,type?:\'::\'|\'->\',args?:array<mixed>}>'],
90409027
'PDOException::getTraceAsString' => ['string'],
9041-
'PDOStatement::__sleep' => ['list<string>'],
9042-
'PDOStatement::__wakeup' => ['void'],
90439028
'PDOStatement::bindColumn' => ['bool', 'column'=>'string|int', '&rw_var'=>'mixed', 'type='=>'int', 'maxLength='=>'int', 'driverOptions='=>'mixed'],
90449029
'PDOStatement::bindParam' => ['bool', 'param'=>'string|int', '&rw_var'=>'mixed', 'type='=>'int', 'maxLength='=>'int', 'driverOptions='=>'mixed'],
90459030
'PDOStatement::bindValue' => ['bool', 'param'=>'string|int', 'value'=>'mixed', 'type='=>'int'],
@@ -12300,7 +12285,6 @@
1230012285
'SplEnum::getConstList' => ['array', 'include_default='=>'bool'],
1230112286
'SplFileInfo::__construct' => ['void', 'filename'=>'string'],
1230212287
'SplFileInfo::__toString' => ['string'],
12303-
'SplFileInfo::__wakeup' => ['void'],
1230412288
'SplFileInfo::getATime' => ['int|false'],
1230512289
'SplFileInfo::getBasename' => ['string', 'suffix='=>'string'],
1230612290
'SplFileInfo::getCTime' => ['int|false'],
@@ -12390,19 +12374,15 @@
1239012374
'SplFixedArray::__construct' => ['void', 'size='=>'int'],
1239112375
'SplFixedArray::__wakeup' => ['void'],
1239212376
'SplFixedArray::count' => ['int'],
12393-
'SplFixedArray::current' => ['mixed'],
1239412377
'SplFixedArray::fromArray' => ['SplFixedArray', 'array'=>'array', 'preserveKeys='=>'bool'],
12378+
'SplFixedArray::getIterator' => ['Iterator'],
1239512379
'SplFixedArray::getSize' => ['int'],
12396-
'SplFixedArray::key' => ['int'],
12397-
'SplFixedArray::next' => ['void'],
1239812380
'SplFixedArray::offsetExists' => ['bool', 'index'=>'int'],
1239912381
'SplFixedArray::offsetGet' => ['mixed', 'index'=>'int'],
1240012382
'SplFixedArray::offsetSet' => ['void', 'index'=>'int', 'value'=>'mixed'],
1240112383
'SplFixedArray::offsetUnset' => ['void', 'index'=>'int'],
12402-
'SplFixedArray::rewind' => ['void'],
1240312384
'SplFixedArray::setSize' => ['bool', 'size'=>'int'],
1240412385
'SplFixedArray::toArray' => ['array'],
12405-
'SplFixedArray::valid' => ['bool'],
1240612386
'SplHeap::__construct' => ['void'],
1240712387
'SplHeap::compare' => ['int', 'value1'=>'mixed', 'value2'=>'mixed'],
1240812388
'SplHeap::count' => ['int'],
@@ -14502,17 +14482,12 @@
1450214482
'wddx_packet_start' => ['resource|false', 'comment='=>'string'],
1450314483
'wddx_serialize_value' => ['string|false', 'value'=>'mixed', 'comment='=>'string'],
1450414484
'wddx_serialize_vars' => ['string|false', 'var_name'=>'mixed', '...vars='=>'mixed'],
14505-
'WeakMap::__construct' => ['void'],
1450614485
'WeakMap::count' => ['int'],
14507-
'WeakMap::current' => ['mixed'],
14508-
'WeakMap::key' => ['object'],
14509-
'WeakMap::next' => ['void'],
14486+
'WeakMap::getIterator' => ['Iterator'],
1451014487
'WeakMap::offsetExists' => ['bool', 'object'=>'object'],
1451114488
'WeakMap::offsetGet' => ['mixed', 'object'=>'object'],
1451214489
'WeakMap::offsetSet' => ['void', 'object'=>'object', 'value'=>'mixed'],
1451314490
'WeakMap::offsetUnset' => ['void', 'object'=>'object'],
14514-
'WeakMap::rewind' => ['void'],
14515-
'WeakMap::valid' => ['bool'],
1451614491
'Weakref::acquire' => ['bool'],
1451714492
'Weakref::get' => ['object'],
1451814493
'Weakref::release' => ['bool'],

dictionaries/CallMap_80_delta.php

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
'ReflectionParameter::getAttributes' => ['list<ReflectionAttribute>', 'name='=>'?string', 'flags='=>'int'],
2929
'ReflectionProperty::getAttributes' => ['list<ReflectionAttribute>', 'name='=>'?string', 'flags='=>'int'],
3030
'ReflectionUnionType::getTypes' => ['list<ReflectionNamedType>'],
31+
'SplFixedArray::getIterator' => ['Iterator'],
32+
'WeakMap::count' => ['int'],
33+
'WeakMap::getIterator' => ['Iterator'],
34+
'WeakMap::offsetExists' => ['bool', 'object'=>'object'],
35+
'WeakMap::offsetGet' => ['mixed', 'object'=>'object'],
36+
'WeakMap::offsetSet' => ['void', 'object'=>'object', 'value'=>'mixed'],
37+
'WeakMap::offsetUnset' => ['void', 'object'=>'object'],
3138
'fdiv' => ['float', 'num1'=>'float', 'num2'=>'float'],
3239
'get_debug_type' => ['string', 'value'=>'mixed'],
3340
'get_resource_id' => ['int', 'resource'=>'resource'],
@@ -2883,6 +2890,11 @@
28832890
'SimpleXMLIterator::next' => ['void'],
28842891
'SimpleXMLIterator::hasChildren' => ['bool'],
28852892
'SimpleXMLIterator::getChildren' => ['?SimpleXMLIterator'],
2893+
'SplFixedArray::current' => ['mixed'],
2894+
'SplFixedArray::key' => ['int'],
2895+
'SplFixedArray::next' => ['void'],
2896+
'SplFixedArray::rewind' => ['void'],
2897+
'SplFixedArray::valid' => ['bool'],
28862898
'SplTempFileObject::fgetss' => ['string', 'allowable_tags='=>'string'],
28872899
'xmlrpc_decode' => ['mixed', 'xml'=>'string', 'encoding='=>'string'],
28882900
'xmlrpc_decode_request' => ['?array', 'xml'=>'string', '&w_method'=>'string', 'encoding='=>'string'],

dictionaries/CallMap_historical.php

-27
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@
293293
'COMPersistHelper::SaveToStream' => ['int', 'stream'=>''],
294294
'COMPersistHelper::__construct' => ['void', 'variant'=>'object'],
295295
'CURLFile::__construct' => ['void', 'filename'=>'string', 'mime_type='=>'string', 'posted_filename='=>'string'],
296-
'CURLFile::__wakeup' => ['void'],
297296
'CURLFile::getFilename' => ['string'],
298297
'CURLFile::getMimeType' => ['string'],
299298
'CURLFile::getPostFilename' => ['string'],
@@ -1623,8 +1622,6 @@
16231622
'GEOSWKTWriter::setRoundingPrecision' => ['void', 'prec'=>'int'],
16241623
'GEOSWKTWriter::setTrim' => ['void', 'trim'=>'bool'],
16251624
'GEOSWKTWriter::write' => ['string', 'geom'=>'GEOSGeometry'],
1626-
'GMP::__construct' => ['void'],
1627-
'GMP::__toString' => ['numeric-string'],
16281625
'GearmanClient::__construct' => ['void'],
16291626
'GearmanClient::addOptions' => ['bool', 'options'=>'int'],
16301627
'GearmanClient::addServer' => ['bool', 'host='=>'string', 'port='=>'int'],
@@ -1738,7 +1735,6 @@
17381735
'Gender\Gender::get' => ['int', 'name'=>'string', 'country='=>'int'],
17391736
'Gender\Gender::isNick' => ['array', 'name0'=>'string', 'name1'=>'string', 'country='=>'int'],
17401737
'Gender\Gender::similarNames' => ['array', 'name'=>'string', 'country='=>'int'],
1741-
'Generator::__wakeup' => ['void'],
17421738
'Generator::current' => ['mixed'],
17431739
'Generator::getReturn' => ['mixed'],
17441740
'Generator::key' => ['mixed'],
@@ -4710,8 +4706,6 @@
47104706
'PDFlib::utf32_to_utf16' => ['string', 'utf32string'=>'string', 'ordering'=>'string'],
47114707
'PDFlib::utf8_to_utf16' => ['string', 'utf8string'=>'string', 'ordering'=>'string'],
47124708
'PDO::__construct' => ['void', 'dsn'=>'string', 'username='=>'?string', 'password='=>'?string', 'options='=>'?array'],
4713-
'PDO::__sleep' => ['list<string>'],
4714-
'PDO::__wakeup' => ['void'],
47154709
'PDO::beginTransaction' => ['bool'],
47164710
'PDO::commit' => ['bool'],
47174711
'PDO::cubrid_schema' => ['array', 'schema_type'=>'int', 'table_name='=>'string', 'col_name='=>'string'],
@@ -4749,8 +4743,6 @@
47494743
'PDOException::getPrevious' => ['?Throwable'],
47504744
'PDOException::getTrace' => ['list<array{file?:string,line?:int,function:string,class?:class-string,type?:\'::\'|\'->\',args?:array<mixed>}>'],
47514745
'PDOException::getTraceAsString' => ['string'],
4752-
'PDOStatement::__sleep' => ['list<string>'],
4753-
'PDOStatement::__wakeup' => ['void'],
47544746
'PDOStatement::bindColumn' => ['bool', 'column'=>'string|int', '&rw_var'=>'mixed', 'type='=>'int', 'maxLength='=>'int', 'driverOptions='=>'mixed'],
47554747
'PDOStatement::bindParam' => ['bool', 'param'=>'string|int', '&rw_var'=>'mixed', 'type='=>'int', 'maxLength='=>'int', 'driverOptions='=>'mixed'],
47564748
'PDOStatement::bindValue' => ['bool', 'param'=>'string|int', 'value'=>'mixed', 'type='=>'int'],
@@ -7515,7 +7507,6 @@
75157507
'SplEnum::getConstList' => ['array', 'include_default='=>'bool'],
75167508
'SplFileInfo::__construct' => ['void', 'filename'=>'string'],
75177509
'SplFileInfo::__toString' => ['string'],
7518-
'SplFileInfo::__wakeup' => ['void'],
75197510
'SplFileInfo::getATime' => ['int|false'],
75207511
'SplFileInfo::getBasename' => ['string', 'suffix='=>'string'],
75217512
'SplFileInfo::getCTime' => ['int|false'],
@@ -8183,17 +8174,6 @@
81838174
'Vtiful\Kernel\Validation::validationType' => ['?Vtiful\Kernel\Validation', 'type'=>'int'],
81848175
'Vtiful\Kernel\Validation::valueList' => ['?Vtiful\Kernel\Validation', 'value_list'=>'array'],
81858176
'Vtiful\Kernel\Validation::valueNumber' => ['?Vtiful\Kernel\Validation', 'value_number'=>'int'],
8186-
'WeakMap::__construct' => ['void'],
8187-
'WeakMap::count' => ['int'],
8188-
'WeakMap::current' => ['mixed'],
8189-
'WeakMap::key' => ['object'],
8190-
'WeakMap::next' => ['void'],
8191-
'WeakMap::offsetExists' => ['bool', 'object'=>'object'],
8192-
'WeakMap::offsetGet' => ['mixed', 'object'=>'object'],
8193-
'WeakMap::offsetSet' => ['void', 'object'=>'object', 'value'=>'mixed'],
8194-
'WeakMap::offsetUnset' => ['void', 'object'=>'object'],
8195-
'WeakMap::rewind' => ['void'],
8196-
'WeakMap::valid' => ['bool'],
81978177
'Weakref::acquire' => ['bool'],
81988178
'Weakref::get' => ['object'],
81998179
'Weakref::release' => ['bool'],
@@ -12726,7 +12706,6 @@
1272612706
'mysqli::commit' => ['bool', 'flags='=>'int', 'name='=>'string'],
1272712707
'mysqli::connect' => ['null|false', 'hostname='=>'string', 'username='=>'string', 'password='=>'string', 'database='=>'string', 'port='=>'int', 'socket='=>'string'],
1272812708
'mysqli::debug' => ['bool', 'options'=>'string'],
12729-
'mysqli::disable_reads_from_master' => ['bool'],
1273012709
'mysqli::dump_debug_info' => ['bool'],
1273112710
'mysqli::escape_string' => ['string', 'string'=>'string'],
1273212711
'mysqli::get_charset' => ['object'],
@@ -12750,13 +12729,9 @@
1275012729
'mysqli::refresh' => ['bool', 'flags'=>'int'],
1275112730
'mysqli::release_savepoint' => ['bool', 'name'=>'string'],
1275212731
'mysqli::rollback' => ['bool', 'flags='=>'int', 'name='=>'string'],
12753-
'mysqli::rpl_query_type' => ['int', 'query'=>'string'],
1275412732
'mysqli::savepoint' => ['bool', 'name'=>'string'],
1275512733
'mysqli::select_db' => ['bool', 'database'=>'string'],
12756-
'mysqli::send_query' => ['bool', 'query'=>'string'],
1275712734
'mysqli::set_charset' => ['bool', 'charset'=>'string'],
12758-
'mysqli::set_local_infile_default' => ['void'],
12759-
'mysqli::set_local_infile_handler' => ['bool', 'read_func='=>'callable'],
1276012735
'mysqli::set_opt' => ['bool', 'option'=>'int', 'value'=>'string|int'],
1276112736
'mysqli::ssl_set' => ['bool', 'key'=>'?string', 'certificate'=>'?string', 'ca_certificate'=>'?string', 'ca_path'=>'?string', 'cipher_algos'=>'?string'],
1276212737
'mysqli::stat' => ['string|false'],
@@ -12778,8 +12753,6 @@
1277812753
'mysqli_debug' => ['true', 'options'=>'string'],
1277912754
'mysqli_disable_reads_from_master' => ['bool', 'link'=>'mysqli'],
1278012755
'mysqli_disable_rpl_parse' => ['bool', 'link'=>'mysqli'],
12781-
'mysqli_driver::embedded_server_end' => ['void'],
12782-
'mysqli_driver::embedded_server_start' => ['bool', 'start'=>'int', 'arguments'=>'array', 'groups'=>'array'],
1278312756
'mysqli_dump_debug_info' => ['bool', 'mysql'=>'mysqli'],
1278412757
'mysqli_embedded_server_end' => ['void'],
1278512758
'mysqli_embedded_server_start' => ['bool', 'start'=>'int', 'arguments'=>'array', 'groups'=>'array'],

tests/Internal/Codebase/InternalCallMapHandlerTest.php

-27
Original file line numberDiff line numberDiff line change
@@ -350,21 +350,8 @@ class InternalCallMapHandlerTest extends TestCase
350350
*/
351351
private static array $ignoredUnreflectableFunctions = [
352352
'closure::__invoke',
353-
'curlfile::__wakeup',
354353
'domimplementation::__construct',
355-
'generator::__wakeup',
356-
'gmp::__construct',
357-
'gmp::__tostring',
358354
'intliterator::__construct',
359-
'mysqli::disable_reads_from_master',
360-
'mysqli::rpl_query_type',
361-
'mysqli::send_query',
362-
'mysqli::set_local_infile_default',
363-
'mysqli::set_local_infile_handler',
364-
'mysqli_driver::embedded_server_end',
365-
'mysqli_driver::embedded_server_start',
366-
'pdo::__sleep',
367-
'pdo::__wakeup',
368355
'pdo::cubrid_schema',
369356
'pdo::pgsqlcopyfromarray',
370357
'pdo::pgsqlcopyfromfile',
@@ -378,31 +365,17 @@ class InternalCallMapHandlerTest extends TestCase
378365
'pdo::sqlitecreateaggregate',
379366
'pdo::sqlitecreatecollation',
380367
'pdo::sqlitecreatefunction',
381-
'pdostatement::__sleep',
382-
'pdostatement::__wakeup',
383368
'simplexmlelement::__get',
384369
'simplexmlelement::offsetexists',
385370
'simplexmlelement::offsetget',
386371
'simplexmlelement::offsetset',
387372
'simplexmlelement::offsetunset',
388373
'spldoublylinkedlist::__construct',
389-
'splfileinfo::__wakeup',
390-
'splfixedarray::current',
391-
'splfixedarray::key',
392-
'splfixedarray::next',
393-
'splfixedarray::rewind',
394-
'splfixedarray::valid',
395374
'splheap::__construct',
396375
'splmaxheap::__construct',
397376
'splobjectstorage::__construct',
398377
'splpriorityqueue::__construct',
399378
'splstack::__construct',
400-
'weakmap::__construct',
401-
'weakmap::current',
402-
'weakmap::key',
403-
'weakmap::next',
404-
'weakmap::rewind',
405-
'weakmap::valid',
406379
];
407380

408381
private static Codebase $codebase;

0 commit comments

Comments
 (0)