Skip to content

Implicitly enable function entry generation when class entry generation is enabled #6675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 1 addition & 4 deletions ext/bcmath/bcmath.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

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

Expand Down
2 changes: 1 addition & 1 deletion ext/bcmath/bcmath_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 2232d60eb40f382b141ec28fe9542bd88e784333 */
* Stub hash: 6a16fed65c0e488e65c43e7df3bd1744e9349cc7 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcadd, 0, 2, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, num1, IS_STRING, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/bz2/bz2.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

/**
* @param string|resource $file
Expand Down
2 changes: 1 addition & 1 deletion ext/bz2/bz2_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 10682cdfc126686cab8497868287459dc574b93d */
* Stub hash: 8116780e328f137ca15ae445c9d6b45cf2f41f06 */

ZEND_BEGIN_ARG_INFO_EX(arginfo_bzopen, 0, 0, 2)
ZEND_ARG_INFO(0, file)
Expand Down
5 changes: 1 addition & 4 deletions ext/calendar/calendar.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

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

Expand Down
2 changes: 1 addition & 1 deletion ext/calendar/calendar_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 4953fb1f36502b399061f5e0ca2f700d09761be3 */
* Stub hash: d383ac249ddc88aee4cfaaefd37e85d913281f8e */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_cal_days_in_month, 0, 3, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, calendar, IS_LONG, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/ctype/ctype.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

function ctype_alnum(mixed $text): bool {}

Expand Down
2 changes: 1 addition & 1 deletion ext/ctype/ctype_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: bdf377cc2819bdc625cd2ee1afed2f3e7990eef8 */
* Stub hash: 155783e1858a7f24dbc1c3e810d5cffee5468bf7 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ctype_alnum, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, text, IS_MIXED, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/curl/curl.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

/** @strict-properties */
final class CurlHandle
Expand Down
2 changes: 1 addition & 1 deletion ext/curl/curl_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 0d1b398a10959922a9e12df75fd8465291058fd5 */
* Stub hash: b0f2f56d0a38656637190456e5ebd87bf052ee14 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_close, 0, 1, IS_VOID, 0)
ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/curl/curl_file.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

class CURLFile
{
Expand Down
2 changes: 1 addition & 1 deletion ext/curl/curl_file_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 4cdab686b39e7c4bb03bd5517a637ff25a38b04a */
* Stub hash: 2bd78005380fd7f885618c4cb993bb21abe8cea9 */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/date/php_date.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

function strtotime(string $datetime, ?int $baseTimestamp = null): int|false {}

Expand Down
2 changes: 1 addition & 1 deletion ext/date/php_date_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: fde1c48b5ad92f574ac049101f421232c6a64252 */
* Stub hash: 108136459e578cc699cffcb84d3335a11f8d5c9d */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/dba/dba.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

/**
* @param string $path
Expand Down
2 changes: 1 addition & 1 deletion ext/dba/dba_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 847b6feaa62709f1a7a432564e9086e509b86bf7 */
* Stub hash: 092664d2d3fa28578e6c8e82160319678c211f0f */

ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2)
ZEND_ARG_INFO(0, path)
Expand Down
5 changes: 1 addition & 4 deletions ext/dom/php_dom.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

class DOMDocumentType extends DOMNode
{
Expand Down
2 changes: 1 addition & 1 deletion ext/dom/php_dom_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 550deb4b432eb0572b30c220998504047fc556f5 */
* Stub hash: 6cc72f07bc62e68dfa1343342b5059e410438e7a */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 1)
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/enchant/enchant.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

/** @strict-properties */
final class EnchantBroker
Expand Down
2 changes: 1 addition & 1 deletion ext/enchant/enchant_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: ec1ad38320dfec1e567b0f0062dbc032c425945c */
* Stub hash: b55b5d39b48d38af9c28bd810c77adcda466f1bd */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_enchant_broker_init, 0, 0, EnchantBroker, MAY_BE_FALSE)
ZEND_END_ARG_INFO()
Expand Down
5 changes: 1 addition & 4 deletions ext/exif/exif.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

function exif_tagname(int $index): string|false {}

Expand Down
2 changes: 1 addition & 1 deletion ext/exif/exif_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 3dde1567a65ab31bd5722ea6d568050420f89439 */
* Stub hash: 466379e651a4944e15a0163eabfb29b7d988d747 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_tagname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/ffi/ffi.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

namespace {

Expand Down
2 changes: 1 addition & 1 deletion ext/ffi/ffi_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: f8eb234b7efa2060f54ed300fc6fa697741b0ab6 */
* Stub hash: e1d300639ded25533502902180fb76dd5b4d92b2 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
Expand Down
5 changes: 1 addition & 4 deletions ext/fileinfo/fileinfo.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

class finfo
{
Expand Down
2 changes: 1 addition & 1 deletion ext/fileinfo/fileinfo_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: ae5759febdd7ad434c8bf2e23e9da334ff9054dd */
* Stub hash: 6b31c20139e3360cb7ff692cc0d5ccfbfd3812bb */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_finfo_open, 0, 0, finfo, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
Expand Down
5 changes: 1 addition & 4 deletions ext/filter/filter.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

function filter_has_var(int $input_type, string $var_name): bool {}

Expand Down
2 changes: 1 addition & 1 deletion ext/filter/filter_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: dc73178b6c82437ae4eec49984613563018d3bde */
* Stub hash: 6285ac516fc8972995db91f1c8bf0c171c8fe594 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_has_var, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, input_type, IS_LONG, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/ftp/ftp.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

/** @strict-properties */
final class FTPConnection
Expand Down
2 changes: 1 addition & 1 deletion ext/ftp/ftp_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: d72294d567338c30f627b8247a8cc27148237e41 */
* Stub hash: db52e4b33562b93173c41d00f20e313553b173b4 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ftp_connect, 0, 1, FTPConnection, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/gd/gd.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

/** @strict-properties */
final class GdImage {}
Expand Down
2 changes: 1 addition & 1 deletion ext/gd/gd_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 174cec5de1eb55d1fe837648255ee56553cdad6e */
* Stub hash: e5688b77ea52f6df10e3335594d9fc1956c10c34 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
Expand Down
5 changes: 1 addition & 4 deletions ext/gettext/gettext.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

function textdomain(?string $domain): string {}

Expand Down
2 changes: 1 addition & 1 deletion ext/gettext/gettext_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 4a111861e8302c685ba08073dacf9f120307d89a */
* Stub hash: bc0c8a6b95afdacad81cc19b5aeb727a58f0cb38 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_textdomain, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1)
Expand Down
5 changes: 1 addition & 4 deletions ext/gmp/gmp.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

class GMP
{
Expand Down
2 changes: 1 addition & 1 deletion ext/gmp/gmp_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 97664dc0e71160eacf28f604964df4e9bc97fde5 */
* Stub hash: 69215fb94adb4156c974360e5698e842471cb27d */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_init, 0, 1, GMP, 0)
ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_STRING, NULL)
Expand Down
6 changes: 1 addition & 5 deletions ext/hash/hash.stub.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/

/** @generate-class-entries */
function hash(string $algo, string $data, bool $binary = false, array $options = []): string|false {}

function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false {}
Expand Down
2 changes: 1 addition & 1 deletion ext/hash/hash_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 58f4af6d45c5e69afd2bcee3207397654980f13e */
* Stub hash: 3973a03a64b0939de0c3677da55a5104c29b1b99 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/iconv/iconv.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

function iconv_strlen(string $string, ?string $encoding = null): int|false {}

Expand Down
2 changes: 1 addition & 1 deletion ext/iconv/iconv_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: c301856deffe269e4bbf1554d9eba4d5cbbb20e8 */
* Stub hash: c7b11a7cd853ede0ca7c5540995d8a7224d00da0 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
Expand Down
5 changes: 1 addition & 4 deletions ext/imap/php_imap.stub.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

/**
* @generate-function-entries
* @generate-class-entries
*/
/** @generate-class-entries */

/** @strict-properties */
final class IMAPConnection {
Expand Down
2 changes: 1 addition & 1 deletion ext/imap/php_imap_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: a1e3bdfdd48746db4743e1667d7ba53832160142 */
* Stub hash: 4ac7b33357082ac0103b125ec3ce1d389eccf5c7 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_open, 0, 3, IMAPConnection, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
Expand Down
Loading