From: Nikita Popov Date: Wed, 7 Oct 2020 15:33:22 +0000 (+0200) Subject: Update ext/phar parameter names X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82d46e353bbcb10c2bd513b477b2ca8284e5617c;p=php Update ext/phar parameter names Closes GH-6307. --- diff --git a/ext/phar/phar_object.stub.php b/ext/phar/phar_object.stub.php index 7eee345b63..f51b3b0368 100644 --- a/ext/phar/phar_object.stub.php +++ b/ext/phar/phar_object.stub.php @@ -13,52 +13,52 @@ class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess public function __destruct() {} /** @return void */ - public function addEmptyDir(string $dirname) {} + public function addEmptyDir(string $directory) {} /** @return void */ - public function addFile(string $filename, ?string $localname = null) {} + public function addFile(string $filename, ?string $localName = null) {} /** @return void */ - public function addFromString(string $localname, string $contents) {} + public function addFromString(string $localName, string $contents) {} /** @return array|false */ - public function buildFromDirectory(string $base_dir, string $regex = "") {} + public function buildFromDirectory(string $directory, string $pattern = "") {} /** @return array|false */ - public function buildFromIterator(Traversable $iterator, ?string $base_directory = null) {} + public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null) {} /** @return void */ - public function compressFiles(int $compression_type) {} + public function compressFiles(int $compression) {} /** @return bool */ public function decompressFiles() {} /** @return Phar|null */ - public function compress(int $compression_type, ?string $file_ext = null) {} + public function compress(int $compression, ?string $extension = null) {} /** @return Phar|null */ - public function decompress(?string $file_ext = null) {} + public function decompress(?string $extension = null) {} /** @return Phar|null */ - public function convertToExecutable(?int $format = null, ?int $compression_type = null, ?string $file_ext = null) {} + public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null) {} /** @return Phar|null */ - public function convertToData(?int $format = null, ?int $compression_type = null, ?string $file_ext = null) {} + public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null) {} /** @return bool */ - public function copy(string $newfile, string $oldfile) {} + public function copy(string $to, string $from) {} /** @return int */ public function count(int $mode = COUNT_NORMAL) {} /** @return bool */ - public function delete(string $entry) {} + public function delete(string $localName) {} /** @return bool */ public function delMetadata() {} /** @return bool */ - public function extractTo(string $pathto, array|string|null $files = null, bool $overwrite = false) {} + public function extractTo(string $directory, array|string|null $files = null, bool $overwrite = false) {} /** @return string|null */ public function getAlias() {} @@ -67,7 +67,7 @@ class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess public function getPath() {} /** @return mixed */ - public function getMetadata(array $unserialize_options = []) {} + public function getMetadata(array $unserializeOptions = []) {} /** @return bool */ public function getModified() {} @@ -91,53 +91,53 @@ class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess public function isCompressed() {} /** @return bool */ - public function isFileFormat(int $fileformat) {} + public function isFileFormat(int $format) {} /** @return bool */ public function isWritable() {} /** - * @param string $entry + * @param string $localName * @return bool */ - public function offsetExists($entry) {} + public function offsetExists($localName) {} /** - * @param string $entry + * @param string $localName * @return PharFileInfo */ - public function offsetGet($entry) {} + public function offsetGet($localName) {} /** - * @param string $entry + * @param string $localName * @param resource|string $value * @return void */ - public function offsetSet($entry, $value) {} + public function offsetSet($localName, $value) {} /** - * @param string $entry + * @param string $localName * @return bool */ - public function offsetUnset($entry) {} + public function offsetUnset($localName) {} /** @return bool */ public function setAlias(string $alias) {} /** @return bool */ - public function setDefaultStub(?string $index = null, ?string $webindex = null) {} + public function setDefaultStub(?string $index = null, ?string $webIndex = null) {} /** @return void */ public function setMetadata(mixed $metadata) {} /** @return void */ - public function setSignatureAlgorithm(int $algorithm, ?string $privatekey = null) {} + public function setSignatureAlgorithm(int $algo, ?string $privateKey = null) {} /** - * @param resource $newstub + * @param resource $stub * @return bool */ - public function setStub($newstub, int $maxlen = -1) {} + public function setStub($stub, int $length = -1) {} /** @return void */ public function startBuffering() {} @@ -147,11 +147,11 @@ class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess final public static function apiVersion(): string {} - final public static function canCompress(int $method = 0): bool {} + final public static function canCompress(int $compression = 0): bool {} final public static function canWrite(): bool {} - final public static function createDefaultStub(?string $index = null, ?string $webindex = null): string {} + final public static function createDefaultStub(?string $index = null, ?string $webIndex = null): string {} final public static function getSupportedCompression(): array {} @@ -159,30 +159,29 @@ class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess final public static function interceptFileFuncs(): void {} - final public static function isValidPharFilename( - string $filename, bool $executable = true): bool {} + final public static function isValidPharFilename(string $filename, bool $executable = true): bool {} final public static function loadPhar(string $filename, ?string $alias = null): bool {} final public static function mapPhar(?string $alias = null, int $offset = 0): bool {} - final public static function running(bool $retphar = true): string {} + final public static function running(bool $returnPhar = true): string {} - final public static function mount(string $inphar, string $externalfile): void {} + final public static function mount(string $pharPath, string $externalPath): void {} - final public static function mungServer(array $munglist): void {} + final public static function mungServer(array $variables): void {} - final public static function unlinkArchive(string $archive): bool {} + final public static function unlinkArchive(string $filename): bool {} final public static function webPhar( - ?string $alias = null, ?string $index = null, string $f404 = "", - array $mimetypes = [], ?callable $rewrites = null): void {} + ?string $alias = null, ?string $index = null, string $fileNotFoundScript = "", + array $mimeTypes = [], ?callable $rewrite = null): void {} } class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAccess { /** @implementation-alias Phar::__construct */ - public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, ?string $alias = null, int $fileformat = 0) {} + public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, ?string $alias = null, int $format = 0) {} /** @implementation-alias Phar::__destruct */ public function __destruct() {} @@ -191,37 +190,37 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc * @return void * @implementation-alias Phar::addEmptyDir */ - public function addEmptyDir(string $dirname) {} + public function addEmptyDir(string $directory) {} /** * @return void * @implementation-alias Phar::addFile */ - public function addFile(string $filename, ?string $localname = null) {} + public function addFile(string $filename, ?string $localName = null) {} /** * @return void * @implementation-alias Phar::addFromString */ - public function addFromString(string $localname, string $contents) {} + public function addFromString(string $localName, string $contents) {} /** * @return array|false * @implementation-alias Phar::buildFromDirectory */ - public function buildFromDirectory(string $base_dir, string $regex = "") {} + public function buildFromDirectory(string $directory, string $pattern = "") {} /** * @return array|false * @implementation-alias Phar::buildFromIterator */ - public function buildFromIterator(Traversable $iterator, ?string $base_directory = null) {} + public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null) {} /** * @return void * @implementation-alias Phar::compressFiles */ - public function compressFiles(int $compression_type) {} + public function compressFiles(int $compression) {} /** * @return bool @@ -233,31 +232,31 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc * @return Phar|null * @implementation-alias Phar::compress */ - public function compress(int $compression_type, ?string $file_ext = null) {} + public function compress(int $compression, ?string $extension = null) {} /** * @return Phar|null * @implementation-alias Phar::decompress */ - public function decompress(?string $file_ext = null) {} + public function decompress(?string $extension = null) {} /** * @return Phar|null * @implementation-alias Phar::convertToExecutable */ - public function convertToExecutable(?int $format = null, ?int $compression_type = null, ?string $file_ext = null) {} + public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null) {} /** * @return Phar|null * @implementation-alias Phar::convertToData */ - public function convertToData(?int $format = null, ?int $compression_type = null, ?string $file_ext = null) {} + public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null) {} /** * @return bool * @implementation-alias Phar::copy */ - public function copy(string $newfile, string $oldfile) {} + public function copy(string $to, string $from) {} /** * @return int @@ -269,7 +268,7 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc * @return bool * @implementation-alias Phar::delete */ - public function delete(string $entry) {} + public function delete(string $localName) {} /** * @return bool @@ -281,7 +280,7 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc * @return bool * @implementation-alias Phar::extractTo */ - public function extractTo(string $pathto, array|string|null $files = null, bool $overwrite = false) {} + public function extractTo(string $directory, array|string|null $files = null, bool $overwrite = false) {} /** * @return string|null @@ -347,7 +346,7 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc * @return bool * @implementation-alias Phar::isFileFormat */ - public function isFileFormat(int $fileformat) {} + public function isFileFormat(int $format) {} /** * @return bool @@ -356,33 +355,33 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc public function isWritable() {} /** - * @param string $entry + * @param string $localName * @return bool * @implementation-alias Phar::offsetExists */ - public function offsetExists($entry) {} + public function offsetExists($localName) {} /** - * @param string $entry + * @param string $localName * @return PharFileInfo * @implementation-alias Phar::offsetGet */ - public function offsetGet($entry) {} + public function offsetGet($localName) {} /** - * @param string $entry + * @param string $localName * @param resource|string $value * @return void * @implementation-alias Phar::offsetSet */ - public function offsetSet($entry, $value) {} + public function offsetSet($localName, $value) {} /** - * @param string $entry + * @param string $localName * @return bool * @implementation-alias Phar::offsetUnset */ - public function offsetUnset($entry) {} + public function offsetUnset($localName) {} /** * @return bool @@ -394,7 +393,7 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc * @return bool * @implementation-alias Phar::setDefaultStub */ - public function setDefaultStub(?string $index = null, ?string $webindex = null) {} + public function setDefaultStub(?string $index = null, ?string $webIndex = null) {} /** * @return void @@ -406,7 +405,7 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc * @return void * @implementation-alias Phar::setSignatureAlgorithm */ - public function setSignatureAlgorithm(int $algorithm, ?string $privatekey = null) {} + public function setSignatureAlgorithm(int $algo, ?string $privateKey = null) {} /** * @param resource $newstub @@ -431,13 +430,13 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc final public static function apiVersion(): string {} /** @implementation-alias Phar::canCompress */ - final public static function canCompress(int $method = 0): bool {} + final public static function canCompress(int $compression = 0): bool {} /** @implementation-alias Phar::canWrite */ final public static function canWrite(): bool {} /** @implementation-alias Phar::createDefaultStub */ - final public static function createDefaultStub(?string $index = null, ?string $webindex = null): string {} + final public static function createDefaultStub(?string $index = null, ?string $webIndex = null): string {} /** @implementation-alias Phar::getSupportedCompression */ final public static function getSupportedCompression(): array {} @@ -449,8 +448,7 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc final public static function interceptFileFuncs(): void {} /** @implementation-alias Phar::isValidPharFilename */ - final public static function isValidPharFilename( - string $filename, bool $executable = true): bool {} + final public static function isValidPharFilename(string $filename, bool $executable = true): bool {} /** @implementation-alias Phar::loadPhar */ final public static function loadPhar(string $filename, ?string $alias = null): bool {} @@ -459,21 +457,21 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc final public static function mapPhar(?string $alias = null, int $offset = 0): bool {} /** @implementation-alias Phar::running */ - final public static function running(bool $retphar = true): string {} + final public static function running(bool $returnPhar = true): string {} /** @implementation-alias Phar::mount */ - final public static function mount(string $inphar, string $externalfile): void {} + final public static function mount(string $pharPath, string $externalPath): void {} /** @implementation-alias Phar::mungServer */ - final public static function mungServer(array $munglist): void {} + final public static function mungServer(array $variables): void {} /** @implementation-alias Phar::unlinkArchive */ - final public static function unlinkArchive(string $archive): bool {} + final public static function unlinkArchive(string $filename): bool {} /** @implementation-alias Phar::webPhar */ final public static function webPhar( - ?string $alias = null, ?string $index = null, string $f404 = "", - array $mimetypes = [], ?callable $rewrites = null): void {} + ?string $alias = null, ?string $index = null, string $fileNotFoundScript = "", + array $mimeTypes = [], ?callable $rewrite = null): void {} } class PharFileInfo extends SplFileInfo @@ -486,7 +484,7 @@ class PharFileInfo extends SplFileInfo public function chmod(int $perms) {} /** @return bool */ - public function compress(int $compression_type) {} + public function compress(int $compression) {} /** @return bool */ public function decompress() {} @@ -504,7 +502,7 @@ class PharFileInfo extends SplFileInfo public function getContent() {} /** @return mixed */ - public function getMetadata(array $unserialize_options = []) {} + public function getMetadata(array $unserializeOptions = []) {} /** @return int */ public function getPharFlags() {} @@ -513,7 +511,7 @@ class PharFileInfo extends SplFileInfo public function hasMetadata() {} /** @return bool */ - public function isCompressed(?int $compression_type = null) {} + public function isCompressed(?int $compression = null) {} /** @return bool */ public function isCRCChecked() {} diff --git a/ext/phar/phar_object_arginfo.h b/ext/phar/phar_object_arginfo.h index cf6de9641a..0998eec27a 100644 --- a/ext/phar/phar_object_arginfo.h +++ b/ext/phar/phar_object_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8dff2050ad65f94a41176cfb280d02c4fb61dcf7 */ + * Stub hash: e06a2ea3d97778e61aca0f91fda7b72c29ef171d */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -11,55 +11,55 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___destruct, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_addEmptyDir, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, dirname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_addFile, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, localname, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, localName, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_addFromString, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, localname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, localName, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, contents, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_buildFromDirectory, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, base_dir, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, regex, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_buildFromIterator, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base_directory, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, baseDirectory, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_compressFiles, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, compression_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, compression, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_class_Phar_decompressFiles arginfo_class_Phar___destruct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_compress, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, compression_type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, file_ext, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO(0, compression, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extension, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_decompress, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, file_ext, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extension, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_convertToExecutable, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compression_type, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, file_ext, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compression, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extension, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_Phar_convertToData arginfo_class_Phar_convertToExecutable ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_copy, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, newfile, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, oldfile, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, from, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_count, 0, 0, 0) @@ -67,13 +67,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_count, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_delete, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, entry, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, localName, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_class_Phar_delMetadata arginfo_class_Phar___destruct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_extractTo, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, pathto, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, files, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, overwrite, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() @@ -83,7 +83,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_Phar_getPath arginfo_class_Phar___destruct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_getMetadata, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, unserialize_options, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, unserializeOptions, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #define arginfo_class_Phar_getModified arginfo_class_Phar___destruct @@ -101,19 +101,19 @@ ZEND_END_ARG_INFO() #define arginfo_class_Phar_isCompressed arginfo_class_Phar___destruct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_isFileFormat, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, fileformat, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, format, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_class_Phar_isWritable arginfo_class_Phar___destruct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_offsetExists, 0, 0, 1) - ZEND_ARG_INFO(0, entry) + ZEND_ARG_INFO(0, localName) ZEND_END_ARG_INFO() #define arginfo_class_Phar_offsetGet arginfo_class_Phar_offsetExists ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_offsetSet, 0, 0, 2) - ZEND_ARG_INFO(0, entry) + ZEND_ARG_INFO(0, localName) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() @@ -125,7 +125,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_setDefaultStub, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, index, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, webindex, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, webIndex, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_setMetadata, 0, 0, 1) @@ -133,13 +133,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_setMetadata, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_setSignatureAlgorithm, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, algorithm, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, privatekey, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, privateKey, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_setStub, 0, 0, 1) - ZEND_ARG_INFO(0, newstub) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlen, IS_LONG, 0, "-1") + ZEND_ARG_INFO(0, stub) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #define arginfo_class_Phar_startBuffering arginfo_class_Phar___destruct @@ -150,7 +150,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_apiVersion, 0, 0, IS_ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_canCompress, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, method, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compression, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_canWrite, 0, 0, _IS_BOOL, 0) @@ -158,7 +158,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_createDefaultStub, 0, 0, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, index, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, webindex, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, webIndex, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_getSupportedCompression, 0, 0, IS_ARRAY, 0) @@ -185,35 +185,35 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_mapPhar, 0, 0, _IS_BO ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_running, 0, 0, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retphar, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, returnPhar, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_mount, 0, 2, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, inphar, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, externalfile, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, pharPath, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, externalPath, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_mungServer, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, munglist, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, variables, IS_ARRAY, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_unlinkArchive, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, archive, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_webPhar, 0, 0, IS_VOID, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alias, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, index, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, f404, IS_STRING, 0, "\"\"") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mimetypes, IS_ARRAY, 0, "[]") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rewrites, IS_CALLABLE, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fileNotFoundScript, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mimeTypes, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rewrite, IS_CALLABLE, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PharData___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alias, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fileformat, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_PharData___destruct arginfo_class_Phar___destruct @@ -254,7 +254,9 @@ ZEND_END_ARG_INFO() #define arginfo_class_PharData_getPath arginfo_class_Phar___destruct -#define arginfo_class_PharData_getMetadata arginfo_class_Phar_getMetadata +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PharData_getMetadata, 0, 0, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, unserialize_options, IS_ARRAY, 0, "[]") +ZEND_END_ARG_INFO() #define arginfo_class_PharData_getModified arginfo_class_Phar___destruct @@ -290,7 +292,10 @@ ZEND_END_ARG_INFO() #define arginfo_class_PharData_setSignatureAlgorithm arginfo_class_Phar_setSignatureAlgorithm -#define arginfo_class_PharData_setStub arginfo_class_Phar_setStub +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PharData_setStub, 0, 0, 1) + ZEND_ARG_INFO(0, newstub) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlen, IS_LONG, 0, "-1") +ZEND_END_ARG_INFO() #define arginfo_class_PharData_startBuffering arginfo_class_Phar___destruct @@ -355,7 +360,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_PharFileInfo_hasMetadata arginfo_class_Phar___destruct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PharFileInfo_isCompressed, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compression_type, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compression, IS_LONG, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_PharFileInfo_isCRCChecked arginfo_class_Phar___destruct diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt index ec61a39c4f..a52a6a03a3 100644 --- a/ext/phar/tests/badparameters.phpt +++ b/ext/phar/tests/badparameters.phpt @@ -228,14 +228,14 @@ try { } ?> --EXPECTF-- -Phar::mungServer(): Argument #1 ($munglist) must be of type array, string given +Phar::mungServer(): Argument #1 ($variables) must be of type array, string given Phar::createDefaultStub(): Argument #1 ($index) must be of type ?string, array given Phar::loadPhar(): Argument #1 ($filename) must be of type string, array given -Phar::canCompress(): Argument #1 ($method) must be of type int, string given +Phar::canCompress(): Argument #1 ($compression) must be of type int, string given Phar::__construct(): Argument #1 ($filename) must be of type string, array given Phar::convertToExecutable(): Argument #1 ($format) must be of type ?int, array given Phar::convertToData(): Argument #1 ($format) must be of type ?int, array given -PharData::delete(): Argument #1 ($entry) must be of type string, array given +PharData::delete(): Argument #1 ($localName) must be of type string, array given Cannot write out phar archive, phar is read-only Entry oops does not exist and cannot be deleted %sfrontcontroller10.phar @@ -244,23 +244,23 @@ A Phar alias cannot be set in a plain tar archive Phar::setAlias(): Argument #1 ($alias) must be of type string, array given Cannot change stub, phar is read-only A Phar stub cannot be set in a plain tar archive -Phar::setStub(): Argument #1 ($newstub) must be of type string, array given +Phar::setStub(): Argument #1 ($stub) must be of type string, array given A Phar stub cannot be set in a plain tar archive Phar::setDefaultStub(): Argument #1 ($index) must be of type ?string, array given Cannot change stub: phar.readonly=1 Cannot set signature algorithm, phar is read-only -Phar::compress(): Argument #1 ($compression_type) must be of type int, array given +Phar::compress(): Argument #1 ($compression) must be of type int, array given Cannot compress phar archive, phar is read-only -Phar::compressFiles(): Argument #1 ($compression_type) must be of type int, array given +Phar::compressFiles(): Argument #1 ($compression) must be of type int, array given Phar is readonly, cannot change compression Phar::copy() expects exactly 2 arguments, 1 given Cannot copy "a" to "b", phar is read-only -Phar::offsetExists(): Argument #1 ($entry) must be of type string, array given -Phar::offsetGet(): Argument #1 ($entry) must be of type string, array given +Phar::offsetExists(): Argument #1 ($localName) must be of type string, array given +Phar::offsetGet(): Argument #1 ($localName) must be of type string, array given Phar::offsetSet() expects exactly 2 arguments, 1 given -PharData::offsetUnset(): Argument #1 ($entry) must be of type string, array given +PharData::offsetUnset(): Argument #1 ($localName) must be of type string, array given Write operations disabled by the php.ini setting phar.readonly -Phar::addEmptyDir(): Argument #1 ($dirname) must be of type string, array given +Phar::addEmptyDir(): Argument #1 ($directory) must be of type string, array given Phar::addFile(): Argument #1 ($filename) must be of type string, array given Phar::addFromString() expects exactly 2 arguments, 1 given Write operations disabled by the php.ini setting phar.readonly diff --git a/ext/phar/tests/bug64931/bug64931.phpt b/ext/phar/tests/bug64931/bug64931.phpt index 6d29b301aa..1826bc1ccf 100644 --- a/ext/phar/tests/bug64931/bug64931.phpt +++ b/ext/phar/tests/bug64931/bug64931.phpt @@ -53,4 +53,4 @@ CAUGHT: Cannot create any files in magic ".phar" directory CAUGHT: Cannot create any files in magic ".phar" directory CAUGHT: Cannot create any files in magic ".phar" directory CAUGHT: Cannot create any files in magic ".phar" directory -CAUGHT: Phar::addFromString(): Argument #1 ($localname) must not contain any null bytes +CAUGHT: Phar::addFromString(): Argument #1 ($localName) must not contain any null bytes diff --git a/ext/phar/tests/cache_list/frontcontroller31.phpt b/ext/phar/tests/cache_list/frontcontroller31.phpt index 897272999c..41e36bf669 100644 --- a/ext/phar/tests/cache_list/frontcontroller31.phpt +++ b/ext/phar/tests/cache_list/frontcontroller31.phpt @@ -13,7 +13,7 @@ Content-type: text/html; charset=UTF-8 --FILE_EXTERNAL-- files/frontcontroller16.phar --EXPECTF-- -Fatal error: Uncaught TypeError: Phar::webPhar(): Argument #5 ($rewrites) must be a valid callback or null, class "fail" not found in %s:%d +Fatal error: Uncaught TypeError: Phar::webPhar(): Argument #5 ($rewrite) must be a valid callback or null, class "fail" not found in %s:%d Stack trace: #0 %s(%d): Phar::webPhar('test.phar', '/index.php', '', Array, Array) #1 {main} diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt index a3da9c276c..e6dfabaf4e 100644 --- a/ext/phar/tests/create_path_error.phpt +++ b/ext/phar/tests/create_path_error.phpt @@ -78,4 +78,4 @@ string(5) "query" 11:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character 12:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character 13:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character -Exception: Phar::offsetSet(): Argument #1 ($entry) must not contain any null bytes +Exception: Phar::offsetSet(): Argument #1 ($localName) must not contain any null bytes diff --git a/ext/phar/tests/frontcontroller31.phpt b/ext/phar/tests/frontcontroller31.phpt index 0554180b86..721df4849c 100644 --- a/ext/phar/tests/frontcontroller31.phpt +++ b/ext/phar/tests/frontcontroller31.phpt @@ -12,7 +12,7 @@ Content-type: text/html; charset=UTF-8 --FILE_EXTERNAL-- files/frontcontroller16.phar --EXPECTF-- -Fatal error: Uncaught TypeError: Phar::webPhar(): Argument #5 ($rewrites) must be a valid callback or null, class "fail" not found in %s:%d +Fatal error: Uncaught TypeError: Phar::webPhar(): Argument #5 ($rewrite) must be a valid callback or null, class "fail" not found in %s:%d Stack trace: #0 %s(%d): Phar::webPhar('test.phar', '/index.php', '', Array, Array) #1 {main} diff --git a/ext/phar/tests/phar_extract.phpt b/ext/phar/tests/phar_extract.phpt index 0a8431d044..d9477e1d9c 100644 --- a/ext/phar/tests/phar_extract.phpt +++ b/ext/phar/tests/phar_extract.phpt @@ -142,7 +142,7 @@ string(3) "hi3" string(3) "hi2" bool(false) Phar::extractTo(): Argument #2 ($files) must be of type array|string|null, stdClass given -Phar::extractTo(): Argument #1 ($pathto) must be of type string, array given +Phar::extractTo(): Argument #1 ($directory) must be of type string, array given Invalid argument, extraction path must be non-zero length Unable to use path "%soops" for extraction, it is a file, must be a directory Invalid argument, array of filenames to extract contains non-string value diff --git a/ext/phar/tests/phar_unlinkarchive.phpt b/ext/phar/tests/phar_unlinkarchive.phpt index a900c1db3f..c6fe0dc508 100644 --- a/ext/phar/tests/phar_unlinkarchive.phpt +++ b/ext/phar/tests/phar_unlinkarchive.phpt @@ -92,7 +92,7 @@ __HALT_COMPILER(); Unknown phar archive "" Unknown phar archive "%sphar_unlinkarchive.phar" Unknown phar archive "%sphar_unlinkarchive.phar.tar": internal corruption of phar "%sphar_unlinkarchive.phar.tar" (truncated entry) -Phar::unlinkArchive(): Argument #1 ($archive) must be of type string, array given +Phar::unlinkArchive(): Argument #1 ($filename) must be of type string, array given bool(false) string(48) "" phar archive "%sphar_unlinkarchive.phar" has open file handles or objects. fclose() all file handles, and unset() all objects prior to calling unlinkArchive()