From 74a67a041647b55363f8cc5db34251c2e3a85cbe Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Thu, 23 Feb 2023 20:49:30 -0600 Subject: [PATCH] Update Phar callmaps --- composer.json | 2 +- dictionaries/CallMap.php | 94 +++++++++---------- dictionaries/CallMap_80_delta.php | 70 +++++++++++--- dictionaries/CallMap_81_delta.php | 16 ++++ dictionaries/CallMap_historical.php | 94 +++++++++---------- .../Codebase/InternalCallMapHandlerTest.php | 53 +---------- 6 files changed, 161 insertions(+), 168 deletions(-) diff --git a/composer.json b/composer.json index d62c80c27c1..48731769287 100644 --- a/composer.json +++ b/composer.json @@ -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": [ diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index fd00dbe1740..200f339c727 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -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'], @@ -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'], +'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'], @@ -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'], diff --git a/dictionaries/CallMap_80_delta.php b/dictionaries/CallMap_80_delta.php index d3e63386220..d1b3f1de0b5 100644 --- a/dictionaries/CallMap_80_delta.php +++ b/dictionaries/CallMap_80_delta.php @@ -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'], @@ -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'], diff --git a/dictionaries/CallMap_81_delta.php b/dictionaries/CallMap_81_delta.php index 6d76650b638..574af5beeef 100644 --- a/dictionaries/CallMap_81_delta.php +++ b/dictionaries/CallMap_81_delta.php @@ -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', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'], 'new' => ['int|false', 'fields'=>'array', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string', 'eol='=>'string'], diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index ef0e49b1e1b..bea108f7c11 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -4842,29 +4842,27 @@ 'ParseError::getPrevious' => ['?Throwable'], 'ParseError::getTrace' => ['list\',args?:array}>'], 'ParseError::getTraceAsString' => ['string'], - '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|false', 'directory'=>'string', 'pattern='=>'string'], + 'Phar::buildFromIterator' => ['array|false', '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::delMetadata' => ['bool'], - 'Phar::delete' => ['bool', 'entry'=>'string'], - 'Phar::extractTo' => ['bool', 'pathto'=>'string', 'files='=>'string|array|null', 'overwrite='=>'bool'], + 'Phar::delete' => ['bool', 'localName'=>'string'], + 'Phar::extractTo' => ['bool', 'directory'=>'string', 'files='=>'string|array|null', 'overwrite='=>'bool'], 'Phar::getAlias' => ['?string'], 'Phar::getMetadata' => ['mixed'], 'Phar::getModified' => ['bool'], @@ -4882,50 +4880,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'], + '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|false', 'directory'=>'string', 'pattern='=>'string'], + 'PharData::buildFromIterator' => ['array|false', '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::delMetadata' => ['bool'], - 'PharData::delete' => ['bool', 'entry'=>'string'], - 'PharData::extractTo' => ['bool', 'pathto'=>'string', 'files='=>'string|array|null', 'overwrite='=>'bool'], + 'PharData::delete' => ['bool', 'localName'=>'string'], + '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::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'], @@ -4936,13 +4935,8 @@ 'PharFileInfo::getPharFlags' => ['int'], 'PharFileInfo::hasMetadata' => ['bool'], 'PharFileInfo::isCRCChecked' => ['bool'], - 'PharFileInfo::isCompressed' => ['bool', 'compression_type='=>'int'], - 'PharFileInfo::isCompressedBZIP2' => ['bool'], - 'PharFileInfo::isCompressedGZ' => ['bool'], - 'PharFileInfo::setCompressedBZIP2' => ['bool'], - 'PharFileInfo::setCompressedGZ' => ['bool'], + 'PharFileInfo::isCompressed' => ['bool', 'compression='=>'int'], 'PharFileInfo::setMetadata' => ['void', 'metadata'=>'mixed'], - 'PharFileInfo::setUncompressed' => ['bool'], 'Pool::__construct' => ['void', 'size'=>'int', 'class'=>'string', 'ctor='=>'array'], 'Pool::collect' => ['int', 'collector='=>'Callable'], 'Pool::resize' => ['void', 'size'=>'int'], @@ -13445,8 +13439,6 @@ 'pg_untrace' => ['bool', 'connection='=>'resource'], 'pg_update' => ['string|bool', 'connection'=>'resource', 'table_name'=>'string', 'values'=>'array', 'conditions'=>'array', 'flags='=>'int'], 'pg_version' => ['array', 'connection='=>'resource'], - 'phardata::setMetadata' => ['void', 'metadata'=>'mixed'], - 'phardata::setSignatureAlgorithm' => ['void', 'sigtype'=>'int'], 'phdfs::__construct' => ['void', 'ip'=>'string', 'port'=>'string'], 'phdfs::__destruct' => ['void'], 'phdfs::connect' => ['bool'], diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index 8da1eb8997c..61be82d0ddd 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -61,8 +61,7 @@ class InternalCallMapHandlerTest extends TestCase '/^redis/', // redis extension '/^imagick/', // imagick extension '/^uopz/', // uopz extension - '/^memcache_/', // memcache extension - '/^memcache::/', // memcache extension + '/^memcache[_:]/', // memcache extension '/^memcachepool/', // memcache extension ]; @@ -444,48 +443,6 @@ class InternalCallMapHandlerTest extends TestCase 'odbc_procedures', 'odbc_result', 'openssl_pkcs7_read', - 'phar::__construct', - 'phar::addemptydir', - 'phar::addfile', - 'phar::addfromstring', - 'phar::buildfromdirectory', - 'phar::buildfromiterator', - 'phar::cancompress', - 'phar::copy', - 'phar::count', - 'phar::createdefaultstub', - 'phar::delete', - 'phar::extractto', - 'phar::mapphar', - 'phar::mount', - 'phar::mungserver', - 'phar::offsetexists', - 'phar::offsetget', - 'phar::offsetset', - 'phar::offsetunset', - 'phar::running', - 'phar::setdefaultstub', - 'phar::setsignaturealgorithm', - 'phar::unlinkarchive', - 'phar::webphar', - 'phardata::__construct', - 'phardata::addemptydir', - 'phardata::addfile', - 'phardata::addfromstring', - 'phardata::buildfromdirectory', - 'phardata::buildfromiterator', - 'phardata::copy', - 'phardata::delete', - 'phardata::extractto', - 'phardata::offsetexists', - 'phardata::offsetget', - 'phardata::offsetset', - 'phardata::offsetunset', - 'phardata::setdefaultstub', - 'phardata::setsignaturealgorithm', - 'pharfileinfo::__construct', - 'pharfileinfo::chmod', - 'pharfileinfo::iscompressed', 'recursivearrayiterator::asort', 'recursivearrayiterator::ksort', 'recursivearrayiterator::offsetexists', @@ -717,14 +674,6 @@ class InternalCallMapHandlerTest extends TestCase 'pdo::sqlitecreatefunction', 'pdostatement::__sleep', 'pdostatement::__wakeup', - 'phar::compressallfilesbzip2', - 'phar::compressallfilesgz', - 'phar::uncompressallfiles', - 'pharfileinfo::iscompressedbzip2', - 'pharfileinfo::iscompressedgz', - 'pharfileinfo::setcompressedbzip2', - 'pharfileinfo::setcompressedgz', - 'pharfileinfo::setuncompressed', 'simplexmlelement::__get', 'simplexmlelement::offsetexists', 'simplexmlelement::offsetget',