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

ext/curl/curl_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: 0d1b398a10959922a9e12df75fd8465291058fd5 */
2+
* Stub hash: b0f2f56d0a38656637190456e5ebd87bf052ee14 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_close, 0, 1, IS_VOID, 0)
55
ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0)

ext/curl/curl_file.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
class CURLFile
96
{

ext/curl/curl_file_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: 4cdab686b39e7c4bb03bd5517a637ff25a38b04a */
2+
* Stub hash: 2bd78005380fd7f885618c4cb993bb21abe8cea9 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)

ext/date/php_date.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 strtotime(string $datetime, ?int $baseTimestamp = null): int|false {}
96

ext/date/php_date_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: fde1c48b5ad92f574ac049101f421232c6a64252 */
2+
* Stub hash: 108136459e578cc699cffcb84d3335a11f8d5c9d */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)

ext/dba/dba.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 $path

ext/dba/dba_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: 847b6feaa62709f1a7a432564e9086e509b86bf7 */
2+
* Stub hash: 092664d2d3fa28578e6c8e82160319678c211f0f */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2)
55
ZEND_ARG_INFO(0, path)

ext/dom/php_dom.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
class DOMDocumentType extends DOMNode
96
{

ext/dom/php_dom_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: 506911ba27d7f57bc66fcba93ea0c284689d9527 */
2+
* Stub hash: c41e6d58eb8b0bbdb07401c4f1eb92c6ba3d324c */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 1)
55
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)

ext/enchant/enchant.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 EnchantBroker

ext/enchant/enchant_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: ec1ad38320dfec1e567b0f0062dbc032c425945c */
2+
* Stub hash: b55b5d39b48d38af9c28bd810c77adcda466f1bd */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_enchant_broker_init, 0, 0, EnchantBroker, MAY_BE_FALSE)
55
ZEND_END_ARG_INFO()

ext/exif/exif.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 exif_tagname(int $index): string|false {}
96

ext/exif/exif_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: 3dde1567a65ab31bd5722ea6d568050420f89439 */
2+
* Stub hash: 466379e651a4944e15a0163eabfb29b7d988d747 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_tagname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)

ext/ffi/ffi.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
namespace {
96

ext/ffi/ffi_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: f8eb234b7efa2060f54ed300fc6fa697741b0ab6 */
2+
* Stub hash: e1d300639ded25533502902180fb76dd5b4d92b2 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")

ext/fileinfo/fileinfo.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
class finfo
96
{

ext/fileinfo/fileinfo_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: ae5759febdd7ad434c8bf2e23e9da334ff9054dd */
2+
* Stub hash: 6b31c20139e3360cb7ff692cc0d5ccfbfd3812bb */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_finfo_open, 0, 0, finfo, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")

ext/filter/filter.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 filter_has_var(int $input_type, string $var_name): bool {}
96

ext/filter/filter_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: dc73178b6c82437ae4eec49984613563018d3bde */
2+
* Stub hash: 6285ac516fc8972995db91f1c8bf0c171c8fe594 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_has_var, 0, 2, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, input_type, IS_LONG, 0)

ext/ftp/ftp.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 FTPConnection

ext/ftp/ftp_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: d72294d567338c30f627b8247a8cc27148237e41 */
2+
* Stub hash: db52e4b33562b93173c41d00f20e313553b173b4 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ftp_connect, 0, 1, FTPConnection, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)

ext/gd/gd.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 GdImage {}

ext/gd/gd_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: 174cec5de1eb55d1fe837648255ee56553cdad6e */
2+
* Stub hash: e5688b77ea52f6df10e3335594d9fc1956c10c34 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0)
55
ZEND_END_ARG_INFO()

ext/gettext/gettext.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 textdomain(?string $domain): string {}
96

ext/gettext/gettext_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: 4a111861e8302c685ba08073dacf9f120307d89a */
2+
* Stub hash: bc0c8a6b95afdacad81cc19b5aeb727a58f0cb38 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_textdomain, 0, 1, IS_STRING, 0)
55
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1)

ext/gmp/gmp.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
class GMP
96
{

ext/gmp/gmp_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: 97664dc0e71160eacf28f604964df4e9bc97fde5 */
2+
* Stub hash: 69215fb94adb4156c974360e5698e842471cb27d */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_init, 0, 1, GMP, 0)
55
ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_STRING, NULL)

ext/hash/hash.stub.php

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

3-
/**
4-
* @generate-function-entries
5-
* @generate-class-entries
6-
*/
7-
3+
/** @generate-class-entries */
84
function hash(string $algo, string $data, bool $binary = false, array $options = []): string|false {}
95

106
function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false {}

ext/hash/hash_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: 58f4af6d45c5e69afd2bcee3207397654980f13e */
2+
* Stub hash: 3973a03a64b0939de0c3677da55a5104c29b1b99 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)

ext/iconv/iconv.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 iconv_strlen(string $string, ?string $encoding = null): int|false {}
96

ext/iconv/iconv_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: c301856deffe269e4bbf1554d9eba4d5cbbb20e8 */
2+
* Stub hash: c7b11a7cd853ede0ca7c5540995d8a7224d00da0 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)

ext/imap/php_imap.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 IMAPConnection {

ext/imap/php_imap_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: a1e3bdfdd48746db4743e1667d7ba53832160142 */
2+
* Stub hash: 4ac7b33357082ac0103b125ec3ce1d389eccf5c7 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_open, 0, 3, IMAPConnection, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)

0 commit comments

Comments
 (0)