mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
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.
This commit is contained in:
parent
2b677aaa34
commit
f0d6151918
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user