Skip to content

Commit 99b08ac

Browse files
committed
Implicitly enable function entry generation when class entry generation is enabled
Closes GH-6675
1 parent ccc70ec commit 99b08ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+65
-158
lines changed

build/gen_stub.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1782,12 +1782,14 @@ protected function pName_FullyQualified(Name\FullyQualified $node) {
17821782
$fileInfo->generateLegacyArginfo = true;
17831783
} else if ($tag->name === 'generate-class-entries') {
17841784
$fileInfo->generateClassEntries = true;
1785+
$fileInfo->declarationPrefix = $tag->value ? $tag->value . " " : "";
17851786
}
17861787
}
17871788
}
17881789

1790+
// Generating class entries require generating function/method entries
17891791
if ($fileInfo->generateClassEntries && !$fileInfo->generateFunctionEntries) {
1790-
throw new Exception("Function entry generation must be enabled when generating class entries");
1792+
$fileInfo->generateFunctionEntries = true;
17911793
}
17921794

17931795
handleStatements($fileInfo, $stmts, $prettyPrinter);

ext/bcmath/bcmath.stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22

3-
/**
4-
* @generate-function-entries
5-
* @generate-class-entries
6-
*/
3+
/** @generate-class-entries */
74

85
function bcadd(string $num1, string $num2, ?int $scale = null): string {}
96

ext/bcmath/bcmath_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 2232d60eb40f382b141ec28fe9542bd88e784333 */
2+
* Stub hash: 6a16fed65c0e488e65c43e7df3bd1744e9349cc7 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcadd, 0, 2, IS_STRING, 0)
55
ZEND_ARG_TYPE_INFO(0, num1, IS_STRING, 0)

ext/bz2/bz2.stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22

3-
/**
4-
* @generate-function-entries
5-
* @generate-class-entries
6-
*/
3+
/** @generate-class-entries */
74

85
/**
96
* @param string|resource $file

ext/bz2/bz2_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 10682cdfc126686cab8497868287459dc574b93d */
2+
* Stub hash: 8116780e328f137ca15ae445c9d6b45cf2f41f06 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_bzopen, 0, 0, 2)
55
ZEND_ARG_INFO(0, file)

ext/calendar/calendar.stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22

3-
/**
4-
* @generate-function-entries
5-
* @generate-class-entries
6-
*/
3+
/** @generate-class-entries */
74

85
function cal_days_in_month(int $calendar, int $month, int $year): int {}
96

ext/calendar/calendar_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 4953fb1f36502b399061f5e0ca2f700d09761be3 */
2+
* Stub hash: d383ac249ddc88aee4cfaaefd37e85d913281f8e */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_cal_days_in_month, 0, 3, IS_LONG, 0)
55
ZEND_ARG_TYPE_INFO(0, calendar, IS_LONG, 0)

ext/ctype/ctype.stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22

3-
/**
4-
* @generate-function-entries
5-
* @generate-class-entries
6-
*/
3+
/** @generate-class-entries */
74

85
function ctype_alnum(mixed $text): bool {}
96

ext/ctype/ctype_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: bdf377cc2819bdc625cd2ee1afed2f3e7990eef8 */
2+
* Stub hash: 155783e1858a7f24dbc1c3e810d5cffee5468bf7 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ctype_alnum, 0, 1, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, text, IS_MIXED, 0)

ext/curl/curl.stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22

3-
/**
4-
* @generate-function-entries
5-
* @generate-class-entries
6-
*/
3+
/** @generate-class-entries */
74

85
/** @strict-properties */
96
final class CurlHandle

0 commit comments

Comments
 (0)