diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-18 16:01:16 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-18 16:04:14 +0100 |
commit | f0d6151918308cfc35171f6f6f6aeb832889c46e (patch) | |
tree | 1f81bd627b1c5d3a9fc9d8e81879d314357af8fe | |
parent | 2b677aaa34d59256d2bbb5b18a0f2bc670c4f72a (diff) | |
download | php-git-f0d6151918308cfc35171f6f6f6aeb832889c46e.tar.gz |
gen_stub: Don't use $aliasMap during verification
Some functions have multiple aliases, while the $aliasMap can
only record one.
Methodsynopsis generation probably shouldn't use it either, but
at least that case seems to only be interested in whether there
is an alias at all.
-rwxr-xr-x | build/gen_stub.php | 7 | ||||
-rw-r--r-- | ext/standard/basic_functions_arginfo.h | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/build/gen_stub.php b/build/gen_stub.php index ee19f57a0c..f231307f2a 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1870,6 +1870,7 @@ foreach ($fileInfos as $fileInfo) { /** @var FuncInfo $funcInfo */ $funcMap[$funcInfo->name->__toString()] = $funcInfo; + // TODO: Don't use aliasMap for methodsynopsis? if ($funcInfo->aliasType === "alias") { $aliasMap[$funcInfo->alias->__toString()] = $funcInfo; } @@ -1879,7 +1880,11 @@ foreach ($fileInfos as $fileInfo) { if ($verify) { $errors = []; - foreach ($aliasMap as $aliasFunc) { + foreach ($funcMap as $aliasFunc) { + if ($aliasFunc->aliasType !== "alias") { + continue; + } + if (!isset($funcMap[$aliasFunc->alias->__toString()])) { $errors[] = "Aliased function {$aliasFunc->alias}() cannot be found"; continue; diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 1b72949a54..e416fc5e27 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 21e54280829776de72313b96e38ad2aee60bd0ee */ + * Stub hash: 4e471966d507762dd6fdd2fc4200c8430fac97f4 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) |