Skip to content

Commit

Permalink
Merge pull request #9389 from othercorey/phar-callmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan authored Feb 24, 2023
2 parents 2315c98 + 74a67a0 commit f4c14a4
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 168 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"Composer\\Config::disableProcessTimeout",
"phpunit"
],
"verify-callmap": "phpunit tests/Internal/Codebase/InternalCallMapHandlerTest.php",
"verify-callmap": "@php phpunit tests/Internal/Codebase/InternalCallMapHandlerTest.php",
"psalm": "@php ./psalm",
"psalm-set-baseline": "@php ./psalm --set-baseline=psalm-baseline.xml",
"tests": [
Expand Down
94 changes: 43 additions & 51 deletions dictionaries/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -9169,29 +9169,27 @@
'pg_untrace' => ['bool', 'connection='=>'?\PgSql\Connection'],
'pg_update' => ['string|bool', 'connection'=>'\PgSql\Connection', 'table_name'=>'string', 'values'=>'array', 'conditions'=>'array', 'flags='=>'int'],
'pg_version' => ['array', 'connection='=>'?\PgSql\Connection'],
'Phar::__construct' => ['void', 'fname'=>'string', 'flags='=>'int', 'alias='=>'string'],
'Phar::addEmptyDir' => ['void', 'dirname'=>'string'],
'Phar::addFile' => ['void', 'file'=>'string', 'localname='=>'string'],
'Phar::addFromString' => ['void', 'localname'=>'string', 'contents'=>'string'],
'Phar::__construct' => ['void', 'filename'=>'string', 'flags='=>'int', 'alias='=>'?string'],
'Phar::addEmptyDir' => ['void', 'directory'=>'string'],
'Phar::addFile' => ['void', 'filename'=>'string', 'localName='=>'?string'],
'Phar::addFromString' => ['void', 'localName'=>'string', 'contents'=>'string'],
'Phar::apiVersion' => ['string'],
'Phar::buildFromDirectory' => ['array', 'base_dir'=>'string', 'regex='=>'string'],
'Phar::buildFromIterator' => ['array', 'iter'=>'Iterator', 'base_directory='=>'string'],
'Phar::canCompress' => ['bool', 'method='=>'int'],
'Phar::buildFromDirectory' => ['array', 'directory'=>'string', 'pattern='=>'string'],
'Phar::buildFromIterator' => ['array', 'iterator'=>'Traversable', 'baseDirectory='=>'?string'],
'Phar::canCompress' => ['bool', 'compression='=>'int'],
'Phar::canWrite' => ['bool'],
'Phar::compress' => ['?Phar', 'compression'=>'int', 'extension='=>'?string'],
'Phar::compressAllFilesBZIP2' => ['bool'],
'Phar::compressAllFilesGZ' => ['bool'],
'Phar::compressFiles' => ['void', 'compression'=>'int'],
'Phar::convertToData' => ['?PharData', 'format='=>'?int', 'compression='=>'?int', 'extension='=>'?string'],
'Phar::convertToExecutable' => ['?Phar', 'format='=>'?int', 'compression='=>'?int', 'extension='=>'?string'],
'Phar::copy' => ['bool', 'oldfile'=>'string', 'newfile'=>'string'],
'Phar::count' => ['int'],
'Phar::createDefaultStub' => ['string', 'indexfile='=>'string', 'webindexfile='=>'string'],
'Phar::copy' => ['bool', 'from'=>'string', 'to'=>'string'],
'Phar::count' => ['int', 'mode='=>'int'],
'Phar::createDefaultStub' => ['string', 'index='=>'?string', 'webIndex='=>'?string'],
'Phar::decompress' => ['?Phar', 'extension='=>'?string'],
'Phar::decompressFiles' => ['bool'],
'Phar::delete' => ['bool', 'entry'=>'string'],
'Phar::delete' => ['bool', 'localName'=>'string'],
'Phar::delMetadata' => ['bool'],
'Phar::extractTo' => ['bool', 'pathto'=>'string', 'files='=>'string|array|null', 'overwrite='=>'bool'],
'Phar::extractTo' => ['bool', 'directory'=>'string', 'files='=>'string|array|null', 'overwrite='=>'bool'],
'Phar::getAlias' => ['?string'],
'Phar::getMetadata' => ['mixed', 'unserializeOptions='=>'array'],
'Phar::getModified' => ['bool'],
Expand All @@ -9209,52 +9207,51 @@
'Phar::isValidPharFilename' => ['bool', 'filename'=>'string', 'executable='=>'bool'],
'Phar::isWritable' => ['bool'],
'Phar::loadPhar' => ['bool', 'filename'=>'string', 'alias='=>'?string'],
'Phar::mapPhar' => ['bool', 'alias='=>'string', 'dataoffset='=>'int'],
'Phar::mount' => ['void', 'pharpath'=>'string', 'externalpath'=>'string'],
'Phar::mungServer' => ['void', 'munglist'=>'array'],
'Phar::offsetExists' => ['bool', 'offset'=>'string'],
'Phar::offsetGet' => ['PharFileInfo', 'offset'=>'string'],
'Phar::offsetSet' => ['void', 'offset'=>'string', 'value'=>'string'],
'Phar::offsetUnset' => ['bool', 'offset'=>'string'],
'Phar::running' => ['string', 'retphar='=>'bool'],
'Phar::mapPhar' => ['bool', 'alias='=>'?string', 'offset='=>'int'],
'Phar::mount' => ['void', 'pharPath'=>'string', 'externalPath'=>'string'],
'Phar::mungServer' => ['void', 'variables'=>'list<string>'],
'Phar::offsetExists' => ['bool', 'localName'=>'string'],
'Phar::offsetGet' => ['PharFileInfo', 'localName'=>'string'],
'Phar::offsetSet' => ['void', 'localName'=>'string', 'value'=>'resource|string'],
'Phar::offsetUnset' => ['void', 'localName'=>'string'],
'Phar::running' => ['string', 'returnPhar='=>'bool'],
'Phar::setAlias' => ['bool', 'alias'=>'string'],
'Phar::setDefaultStub' => ['bool', 'index='=>'string', 'webindex='=>'string'],
'Phar::setDefaultStub' => ['bool', 'index='=>'?string', 'webIndex='=>'?string'],
'Phar::setMetadata' => ['void', 'metadata'=>''],
'Phar::setSignatureAlgorithm' => ['void', 'sigtype'=>'int', 'privatekey='=>'string'],
'Phar::setSignatureAlgorithm' => ['void', 'algo'=>'int', 'privateKey='=>'?string'],
'Phar::setStub' => ['bool', 'stub'=>'string', 'length='=>'int'],
'Phar::startBuffering' => ['void'],
'Phar::stopBuffering' => ['void'],
'Phar::uncompressAllFiles' => ['bool'],
'Phar::unlinkArchive' => ['bool', 'archive'=>'string'],
'Phar::webPhar' => ['', 'alias='=>'string', 'index='=>'string', 'f404='=>'string', 'mimetypes='=>'array', 'rewrites='=>'array'],
'PharData::__construct' => ['void', 'fname'=>'string', 'flags='=>'?int', 'alias='=>'?string', 'format='=>'int'],
'PharData::addEmptyDir' => ['bool', 'dirname'=>'string'],
'PharData::addFile' => ['void', 'file'=>'string', 'localname='=>'string'],
'PharData::addFromString' => ['bool', 'localname'=>'string', 'contents'=>'string'],
'PharData::buildFromDirectory' => ['array', 'base_dir'=>'string', 'regex='=>'string'],
'PharData::buildFromIterator' => ['array', 'iter'=>'Iterator', 'base_directory='=>'string'],
'Phar::unlinkArchive' => ['bool', 'filename'=>'string'],
'Phar::webPhar' => ['void', 'alias='=>'?string', 'index='=>'?string', 'fileNotFoundScript='=>'?string', 'mimeTypes='=>'array', 'rewrite='=>'?callable'],
'PharData::__construct' => ['void', 'filename'=>'string', 'flags='=>'int', 'alias='=>'?string', 'format='=>'int'],
'PharData::addEmptyDir' => ['void', 'directory'=>'string'],
'PharData::addFile' => ['void', 'filename'=>'string', 'localName='=>'?string'],
'PharData::addFromString' => ['void', 'localName'=>'string', 'contents'=>'string'],
'PharData::buildFromDirectory' => ['array', 'directory'=>'string', 'pattern='=>'string'],
'PharData::buildFromIterator' => ['array', 'iterator'=>'Traversable', 'baseDirectory='=>'?string'],
'PharData::compress' => ['?PharData', 'compression'=>'int', 'extension='=>'?string'],
'PharData::compressFiles' => ['void', 'compression'=>'int'],
'PharData::convertToData' => ['?PharData', 'format='=>'?int', 'compression='=>'?int', 'extension='=>'?string'],
'PharData::convertToExecutable' => ['?Phar', 'format='=>'?int', 'compression='=>'?int', 'extension='=>'?string'],
'PharData::copy' => ['bool', 'oldfile'=>'string', 'newfile'=>'string'],
'PharData::copy' => ['bool', 'from'=>'string', 'to'=>'string'],
'PharData::decompress' => ['?PharData', 'extension='=>'?string'],
'PharData::decompressFiles' => ['bool'],
'PharData::delete' => ['bool', 'entry'=>'string'],
'PharData::delete' => ['bool', 'localName'=>'string'],
'PharData::delMetadata' => ['bool'],
'PharData::extractTo' => ['bool', 'pathto'=>'string', 'files='=>'string|array|null', 'overwrite='=>'bool'],
'PharData::extractTo' => ['bool', 'directory'=>'string', 'files='=>'string|array|null', 'overwrite='=>'bool'],
'PharData::isWritable' => ['bool'],
'PharData::offsetExists' => ['bool', 'offset'=>'string'],
'PharData::offsetGet' => ['PharFileInfo', 'offset'=>'string'],
'PharData::offsetSet' => ['void', 'offset'=>'string', 'value'=>'string'],
'PharData::offsetUnset' => ['bool', 'offset'=>'string'],
'PharData::offsetExists' => ['bool', 'localName'=>'string'],
'PharData::offsetGet' => ['PharFileInfo', 'localName'=>'string'],
'PharData::offsetSet' => ['void', 'localName'=>'string', 'value'=>'string'],
'PharData::offsetUnset' => ['void', 'localName'=>'string'],
'PharData::setAlias' => ['bool', 'alias'=>'string'],
'PharData::setDefaultStub' => ['bool', 'index='=>'string', 'webindex='=>'string'],
'phardata::setMetadata' => ['void', 'metadata'=>'mixed'],
'phardata::setSignatureAlgorithm' => ['void', 'sigtype'=>'int'],
'PharData::setDefaultStub' => ['bool', 'index='=>'?string', 'webIndex='=>'?string'],
'PharData::setMetadata' => ['void', 'metadata'=>'mixed'],
'PharData::setSignatureAlgorithm' => ['void', 'algo'=>'int', 'privateKey='=>'?string'],
'PharData::setStub' => ['bool', 'stub'=>'string', 'length='=>'int'],
'PharFileInfo::__construct' => ['void', 'entry'=>'string'],
'PharFileInfo::chmod' => ['void', 'permissions'=>'int'],
'PharFileInfo::__construct' => ['void', 'filename'=>'string'],
'PharFileInfo::chmod' => ['void', 'perms'=>'int'],
'PharFileInfo::compress' => ['bool', 'compression'=>'int'],
'PharFileInfo::decompress' => ['bool'],
'PharFileInfo::delMetadata' => ['bool'],
Expand All @@ -9264,14 +9261,9 @@
'PharFileInfo::getMetadata' => ['mixed', 'unserializeOptions='=>'array'],
'PharFileInfo::getPharFlags' => ['int'],
'PharFileInfo::hasMetadata' => ['bool'],
'PharFileInfo::isCompressed' => ['bool', 'compression_type='=>'int'],
'PharFileInfo::isCompressedBZIP2' => ['bool'],
'PharFileInfo::isCompressedGZ' => ['bool'],
'PharFileInfo::isCompressed' => ['bool', 'compression='=>'?int'],
'PharFileInfo::isCRCChecked' => ['bool'],
'PharFileInfo::setCompressedBZIP2' => ['bool'],
'PharFileInfo::setCompressedGZ' => ['bool'],
'PharFileInfo::setMetadata' => ['void', 'metadata'=>'mixed'],
'PharFileInfo::setUncompressed' => ['bool'],
'phdfs::__construct' => ['void', 'ip'=>'string', 'port'=>'string'],
'phdfs::__destruct' => ['void'],
'phdfs::connect' => ['bool'],
Expand Down
70 changes: 57 additions & 13 deletions dictionaries/CallMap_80_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,21 +209,17 @@
'old' => ['bool', 'mode'=>'int'],
'new' => ['bool', 'mode'=>'int', '...args='=>'mixed'],
],
'PharData::compress' => [
'old' => ['?PharData', 'compression'=>'int', 'extension='=>'string'],
'new' => ['?PharData', 'compression'=>'int', 'extension='=>'?string'],
'Phar::addFile' => [
'old' => ['void', 'filename'=>'string', 'localName='=>'string'],
'new' => ['void', 'filename'=>'string', 'localName='=>'?string'],
],
'PharData::convertToData' => [
'old' => ['?PharData', 'format='=>'int', 'compression='=>'int', 'extension='=>'string'],
'new' => ['?PharData', 'format='=>'?int', 'compression='=>'?int', 'extension='=>'?string'],
'Phar::buildFromIterator' => [
'old' => ['array|false', 'iterator'=>'Traversable', 'baseDirectory='=>'string'],
'new' => ['array|false', 'iterator'=>'Traversable', 'baseDirectory='=>'?string'],
],
'PharData::convertToExecutable' => [
'old' => ['?Phar', 'format='=>'int', 'compression='=>'int', 'extension='=>'string'],
'new' => ['?Phar', 'format='=>'?int', 'compression='=>'?int', 'extension='=>'?string'],
],
'PharData::decompress' => [
'old' => ['?PharData', 'extension='=>'string'],
'new' => ['?PharData', 'extension='=>'?string'],
'Phar::createDefaultStub' => [
'old' => ['string', 'index='=>'string', 'webIndex='=>'string'],
'new' => ['string', 'index='=>'?string', 'webIndex='=>'?string'],
],
'Phar::compress' => [
'old' => ['?Phar', 'compression'=>'int', 'extension='=>'string'],
Expand All @@ -245,10 +241,58 @@
'old' => ['mixed'],
'new' => ['mixed', 'unserializeOptions='=>'array'],
],
'Phar::setDefaultStub' => [
'old' => ['bool', 'index='=>'?string', 'webIndex='=>'string'],
'new' => ['bool', 'index='=>'?string', 'webIndex='=>'?string'],
],
'Phar::setSignatureAlgorithm' => [
'old' => ['void', 'algo'=>'int', 'privateKey='=>'string'],
'new' => ['void', 'algo'=>'int', 'privateKey='=>'?string'],
],
'Phar::webPhar' => [
'old' => ['void', 'alias='=>'?string', 'index='=>'?string', 'fileNotFoundScript='=>'string', 'mimeTypes='=>'array', 'rewrite='=>'callable'],
'new' => ['void', 'alias='=>'?string', 'index='=>'?string', 'fileNotFoundScript='=>'?string', 'mimeTypes='=>'array', 'rewrite='=>'?callable'],
],
'PharData::addFile' => [
'old' => ['void', 'filename'=>'string', 'localName='=>'string'],
'new' => ['void', 'filename'=>'string', 'localName='=>'?string'],
],
'PharData::buildFromIterator' => [
'old' => ['array|false', 'iterator'=>'Traversable', 'baseDirectory='=>'string'],
'new' => ['array|false', 'iterator'=>'Traversable', 'baseDirectory='=>'?string'],
],
'PharData::compress' => [
'old' => ['?PharData', 'compression'=>'int', 'extension='=>'string'],
'new' => ['?PharData', 'compression'=>'int', 'extension='=>'?string'],
],
'PharData::convertToData' => [
'old' => ['?PharData', 'format='=>'int', 'compression='=>'int', 'extension='=>'string'],
'new' => ['?PharData', 'format='=>'?int', 'compression='=>'?int', 'extension='=>'?string'],
],
'PharData::convertToExecutable' => [
'old' => ['?Phar', 'format='=>'int', 'compression='=>'int', 'extension='=>'string'],
'new' => ['?Phar', 'format='=>'?int', 'compression='=>'?int', 'extension='=>'?string'],
],
'PharData::decompress' => [
'old' => ['?PharData', 'extension='=>'string'],
'new' => ['?PharData', 'extension='=>'?string'],
],
'PharData::setDefaultStub' => [
'old' => ['bool', 'index='=>'?string', 'webIndex='=>'string'],
'new' => ['bool', 'index='=>'?string', 'webIndex='=>'?string'],
],
'PharData::setSignatureAlgorithm' => [
'old' => ['void', 'algo'=>'int', 'privateKey='=>'string'],
'new' => ['void', 'algo'=>'int', 'privateKey='=>'?string'],
],
'PharFileInfo::getMetadata' => [
'old' => ['mixed'],
'new' => ['mixed', 'unserializeOptions='=>'array'],
],
'PharFileInfo::isCompressed' => [
'old' => ['bool', 'compression='=>'int'],
'new' => ['bool', 'compression='=>'?int'],
],
'RecursiveIteratorIterator::getSubIterator' => [
'old' => ['?RecursiveIterator', 'level='=>'int'],
'new' => ['?RecursiveIterator', 'level='=>'?int'],
Expand Down
16 changes: 16 additions & 0 deletions dictionaries/CallMap_81_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@
'old' => ['DOMDocumentFragment|false'],
'new' => ['DOMDocumentFragment'],
],
'Phar::buildFromDirectory' => [
'old' => ['array|false', 'directory'=>'string', 'pattern='=>'string'],
'new' => ['array', 'directory'=>'string', 'pattern='=>'string'],
],
'Phar::buildFromIterator' => [
'old' => ['array|false', 'iterator'=>'Traversable', 'baseDirectory='=>'?string'],
'new' => ['array', 'iterator'=>'Traversable', 'baseDirectory='=>'?string'],
],
'PharData::buildFromDirectory' => [
'old' => ['array|false', 'directory'=>'string', 'pattern='=>'string'],
'new' => ['array', 'directory'=>'string', 'pattern='=>'string'],
],
'PharData::buildFromIterator' => [
'old' => ['array|false', 'iterator'=>'Traversable', 'baseDirectory='=>'?string'],
'new' => ['array', 'iterator'=>'Traversable', 'baseDirectory='=>'?string'],
],
'SplFileObject::fputcsv' => [
'old' => ['int|false', 'fields'=>'array<array-key, null|scalar|Stringable>', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'new' => ['int|false', 'fields'=>'array<array-key, null|scalar|Stringable>', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string', 'eol='=>'string'],
Expand Down
Loading

0 comments on commit f4c14a4

Please sign in to comment.