From: Máté Kocsis Date: Mon, 8 Feb 2021 19:08:11 +0000 (+0100) Subject: Implicitly enable function entry generation when class entry generation is enabled X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99b08ac2817672c108149a65509c79baf261e819;p=php Implicitly enable function entry generation when class entry generation is enabled Closes GH-6675 --- 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); diff --git a/ext/bcmath/bcmath.stub.php b/ext/bcmath/bcmath.stub.php index daf479089d..e0b86ebe5b 100644 --- a/ext/bcmath/bcmath.stub.php +++ b/ext/bcmath/bcmath.stub.php @@ -1,9 +1,6 @@