From 26dfdda279d833bd7cb3505bdf97c350382d3415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 8 Feb 2021 20:08:11 +0100 Subject: [PATCH] Implicitly enable function entry generation when class entry generation is enabled --- build/gen_stub.php | 4 +++- ext/bcmath/bcmath.stub.php | 5 +---- ext/bcmath/bcmath_arginfo.h | 2 +- ext/bz2/bz2.stub.php | 5 +---- ext/bz2/bz2_arginfo.h | 2 +- ext/calendar/calendar.stub.php | 5 +---- ext/calendar/calendar_arginfo.h | 2 +- ext/ctype/ctype.stub.php | 5 +---- ext/ctype/ctype_arginfo.h | 2 +- ext/curl/curl.stub.php | 5 +---- ext/curl/curl_arginfo.h | 2 +- ext/curl/curl_file.stub.php | 5 +---- ext/curl/curl_file_arginfo.h | 2 +- ext/date/php_date.stub.php | 5 +---- ext/date/php_date_arginfo.h | 2 +- ext/dba/dba.stub.php | 5 +---- ext/dba/dba_arginfo.h | 2 +- ext/dom/php_dom.stub.php | 5 +---- ext/dom/php_dom_arginfo.h | 2 +- ext/enchant/enchant.stub.php | 5 +---- ext/enchant/enchant_arginfo.h | 2 +- ext/exif/exif.stub.php | 5 +---- ext/exif/exif_arginfo.h | 2 +- ext/ffi/ffi.stub.php | 5 +---- ext/ffi/ffi_arginfo.h | 2 +- ext/fileinfo/fileinfo.stub.php | 5 +---- ext/fileinfo/fileinfo_arginfo.h | 2 +- ext/filter/filter.stub.php | 5 +---- ext/filter/filter_arginfo.h | 2 +- ext/ftp/ftp.stub.php | 5 +---- ext/ftp/ftp_arginfo.h | 2 +- ext/gd/gd.stub.php | 5 +---- ext/gd/gd_arginfo.h | 2 +- ext/gettext/gettext.stub.php | 5 +---- ext/gettext/gettext_arginfo.h | 2 +- ext/gmp/gmp.stub.php | 5 +---- ext/gmp/gmp_arginfo.h | 2 +- ext/hash/hash.stub.php | 6 +----- ext/hash/hash_arginfo.h | 2 +- ext/iconv/iconv.stub.php | 5 +---- ext/iconv/iconv_arginfo.h | 2 +- ext/imap/php_imap.stub.php | 5 +---- ext/imap/php_imap_arginfo.h | 2 +- ext/intl/common/common.stub.php | 5 +---- ext/intl/common/common_arginfo.h | 2 +- ext/intl/resourcebundle/resourcebundle.stub.php | 5 +---- ext/intl/resourcebundle/resourcebundle_arginfo.h | 2 +- ext/intl/transliterator/transliterator.stub.php | 5 +---- ext/intl/transliterator/transliterator_arginfo.h | 2 +- ext/json/json.stub.php | 5 +---- ext/json/json_arginfo.h | 2 +- ext/libxml/libxml.stub.php | 6 +----- ext/libxml/libxml_arginfo.h | 2 +- ext/pdo/pdo_stmt.stub.php | 5 +---- ext/pdo/pdo_stmt_arginfo.h | 2 +- ext/simplexml/simplexml.stub.php | 5 +---- ext/simplexml/simplexml_arginfo.h | 2 +- ext/tokenizer/tokenizer.stub.php | 5 +---- ext/tokenizer/tokenizer_arginfo.h | 2 +- ext/xml/xml.stub.php | 5 +---- ext/xml/xml_arginfo.h | 2 +- ext/zend_test/test.stub.php | 5 +---- ext/zend_test/test_arginfo.h | 2 +- 63 files changed, 65 insertions(+), 158 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 38d58cf7c4223..c036ec15d20cd 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1782,12 +1782,14 @@ protected function pName_FullyQualified(Name\FullyQualified $node) { $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 daf479089d218..e0b86ebe5b9d2 100644 --- a/ext/bcmath/bcmath.stub.php +++ b/ext/bcmath/bcmath.stub.php @@ -1,9 +1,6 @@