summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2021-02-08 20:08:11 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2021-02-09 13:37:24 +0100
commit99b08ac2817672c108149a65509c79baf261e819 (patch)
tree6ac3e5c3e9edbb1e47ac616446f7819971975202 /build
parentccc70ec5d429f9b7e47888593d48f39843d7e441 (diff)
downloadphp-git-99b08ac2817672c108149a65509c79baf261e819.tar.gz
Implicitly enable function entry generation when class entry generation is enabled
Closes GH-6675
Diffstat (limited to 'build')
-rwxr-xr-xbuild/gen_stub.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/build/gen_stub.php b/build/gen_stub.php
index 38d58cf7c4..c036ec15d2 100755
--- a/build/gen_stub.php
+++ b/build/gen_stub.php
@@ -1782,12 +1782,14 @@ function parseStubFile(string $code): FileInfo {
$fileInfo->generateLegacyArginfo = true;
} else if ($tag->name === 'generate-class-entries') {
$fileInfo->generateClassEntries = true;
+ $fileInfo->declarationPrefix = $tag->value ? $tag->value . " " : "";
}
}
}
+ // Generating class entries require generating function/method entries
if ($fileInfo->generateClassEntries && !$fileInfo->generateFunctionEntries) {
- throw new Exception("Function entry generation must be enabled when generating class entries");
+ $fileInfo->generateFunctionEntries = true;
}
handleStatements($fileInfo, $stmts, $prettyPrinter);