Skip to content

Fix class constant and property ID generation for the manual #14249

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

Merged
merged 1 commit into from
May 17, 2024
Merged
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: 2 additions & 2 deletions build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2584,7 +2584,7 @@ protected function getFieldSynopsisDefaultLinkend(): string
{
$className = str_replace(["\\", "_"], ["-", "-"], $this->name->class->toLowerString());

return "$className.constants." . strtolower(str_replace("_", "-", $this->name->getDeclarationName()));
return "$className.constants." . strtolower(str_replace(["__", "_"], ["", "-"], $this->name->getDeclarationName()));
}

protected function getFieldSynopsisName(): string
Expand Down Expand Up @@ -2919,7 +2919,7 @@ protected function getFieldSynopsisDefaultLinkend(): string
{
$className = str_replace(["\\", "_"], ["-", "-"], $this->name->class->toLowerString());

return "$className.props." . strtolower(str_replace("_", "-", $this->name->getDeclarationName()));
return "$className.props." . strtolower(str_replace(["__", "_"], ["", "-"], $this->name->getDeclarationName()));
}

protected function getFieldSynopsisName(): string
Expand Down
5 changes: 1 addition & 4 deletions ext/ffi/ffi.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
/** @not-serializable */
final class FFI
{
/**
* @cvalue __BIGGEST_ALIGNMENT__
* @link ffi-ffi.constants.biggest-alignment
*/
/** @cvalue __BIGGEST_ALIGNMENT__ */
public const int __BIGGEST_ALIGNMENT__ = UNKNOWN;

public static function cdef(string $code = "", ?string $lib = null): FFI {}
Expand Down
2 changes: 1 addition & 1 deletion ext/ffi/ffi_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 12 additions & 48 deletions ext/snmp/snmp.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,66 +183,30 @@ function snmp_read_mib(string $filename): bool {}

class SNMP
{
/**
* @cvalue SNMP_VERSION_1
* @link snmp.class.constants.version-1
*/
/** @cvalue SNMP_VERSION_1 */
public const int VERSION_1 = UNKNOWN;
/**
* @cvalue SNMP_VERSION_2c
* @link snmp.class.constants.version-2c
*/
/** @cvalue SNMP_VERSION_2c */
public const int VERSION_2c = UNKNOWN;
/**
* @cvalue SNMP_VERSION_2c
* @link snmp.class.constants.version-2c
*/
/** @cvalue SNMP_VERSION_2c */
public const int VERSION_2C = UNKNOWN;
/**
* @cvalue SNMP_VERSION_3
* @link snmp.class.constants.version-3
*/
/** @cvalue SNMP_VERSION_3 */
public const int VERSION_3 = UNKNOWN;

/**
* @cvalue PHP_SNMP_ERRNO_NOERROR
* @link snmp.class.constants.errno-noerror
*/
/** @cvalue PHP_SNMP_ERRNO_NOERROR */
public const int ERRNO_NOERROR = UNKNOWN;
/**
* @cvalue PHP_SNMP_ERRNO_ANY
* @link snmp.class.constants.errno-any
*/
/** @cvalue PHP_SNMP_ERRNO_ANY */
public const int ERRNO_ANY = UNKNOWN;
/**
* @cvalue PHP_SNMP_ERRNO_GENERIC
* @link snmp.class.constants.errno-generic
*/
/** @cvalue PHP_SNMP_ERRNO_GENERIC */
public const int ERRNO_GENERIC = UNKNOWN;
/**
* @cvalue PHP_SNMP_ERRNO_TIMEOUT
* @link snmp.class.constants.errno-timeout
*/
/** @cvalue PHP_SNMP_ERRNO_TIMEOUT */
public const int ERRNO_TIMEOUT = UNKNOWN;
/**
* @cvalue PHP_SNMP_ERRNO_ERROR_IN_REPLY
* @link snmp.class.constants.errno-error-in-reply
*/
/** @cvalue PHP_SNMP_ERRNO_ERROR_IN_REPLY */
public const int ERRNO_ERROR_IN_REPLY = UNKNOWN;
/**
* @cvalue PHP_SNMP_ERRNO_OID_NOT_INCREASING
* @link snmp.class.constants.errno-oid-not-increasing
*/
/** @cvalue PHP_SNMP_ERRNO_OID_NOT_INCREASING */
public const int ERRNO_OID_NOT_INCREASING = UNKNOWN;
/**
* @cvalue PHP_SNMP_ERRNO_OID_PARSING_ERROR
* @link snmp.class.constants.errno-oid-parsing-error
*/
/** @cvalue PHP_SNMP_ERRNO_OID_PARSING_ERROR */
public const int ERRNO_OID_PARSING_ERROR = UNKNOWN;
/**
* @cvalue PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES
* @link snmp.class.constants.errno-multiple-set-queries
*/
/** @cvalue PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES */
public const int ERRNO_MULTIPLE_SET_QUERIES = UNKNOWN;

/** @readonly */
Expand Down
2 changes: 1 addition & 1 deletion ext/snmp/snmp_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

185 changes: 37 additions & 148 deletions ext/sqlite3/sqlite3.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,197 +78,86 @@ class SQLite3Exception extends \Exception
/** @not-serializable */
class SQLite3
{
/**
* @cvalue SQLITE_OK
* @link sqlite3.class.constants.ok
*/
/** @cvalue SQLITE_OK */
public const int OK = UNKNOWN;

/* Constants for authorizer return */

/**
* @cvalue SQLITE_DENY
* @link sqlite3.class.constants.deny
*/
/** @cvalue SQLITE_DENY */
public const int DENY = UNKNOWN;
/**
* @cvalue SQLITE_IGNORE
* @link sqlite3.class.constants.ignore
*/
/** @cvalue SQLITE_IGNORE */
public const int IGNORE = UNKNOWN;

/* Constants for authorizer actions */

/**
* @cvalue SQLITE_CREATE_INDEX
* @link sqlite3.class.constants.create-index
*/
/** @cvalue SQLITE_CREATE_INDEX */
public const int CREATE_INDEX = UNKNOWN;
/**
* @cvalue SQLITE_CREATE_TABLE
* @link sqlite3.class.constants.create-table
*/
/** @cvalue SQLITE_CREATE_TABLE */
public const int CREATE_TABLE = UNKNOWN;
/**
* @cvalue SQLITE_CREATE_TEMP_INDEX
* @link sqlite3.class.constants.create-temp-index
*/
/** @cvalue SQLITE_CREATE_TEMP_INDEX */
public const int CREATE_TEMP_INDEX = UNKNOWN;
/**
* @cvalue SQLITE_CREATE_TEMP_TABLE
* @link sqlite3.class.constants.create-temp-table
*/
/** @cvalue SQLITE_CREATE_TEMP_TABLE */
public const int CREATE_TEMP_TABLE = UNKNOWN;
/**
* @cvalue SQLITE_CREATE_TEMP_TRIGGER
* @link sqlite3.class.constants.create-temp-trigger
*/
/** @cvalue SQLITE_CREATE_TEMP_TRIGGER */
public const int CREATE_TEMP_TRIGGER = UNKNOWN;
/**
* @cvalue SQLITE_CREATE_TEMP_VIEW
* @link sqlite3.class.constants.create-temp-view
*/
/** @cvalue SQLITE_CREATE_TEMP_VIEW */
public const int CREATE_TEMP_VIEW = UNKNOWN;
/**
* @cvalue SQLITE_CREATE_TRIGGER
* @link sqlite3.class.constants.create-trigger
*/
/** @cvalue SQLITE_CREATE_TRIGGER */
public const int CREATE_TRIGGER = UNKNOWN;
/**
* @cvalue SQLITE_CREATE_VIEW
* @link sqlite3.class.constants.create-view
*/
/** @cvalue SQLITE_CREATE_VIEW */
public const int CREATE_VIEW = UNKNOWN;
/**
* @cvalue SQLITE_DELETE
* @link sqlite3.class.constants.delete
*/
/** @cvalue SQLITE_DELETE */
public const int DELETE = UNKNOWN;
/**
* @cvalue SQLITE_DROP_INDEX
* @link sqlite3.class.constants.drop-index
*/
/** @cvalue SQLITE_DROP_INDEX */
public const int DROP_INDEX = UNKNOWN;
/**
* @cvalue SQLITE_DROP_TABLE
* @link sqlite3.class.constants.drop-table
*/
/** @cvalue SQLITE_DROP_TABLE */
public const int DROP_TABLE = UNKNOWN;
/**
* @cvalue SQLITE_DROP_TEMP_INDEX
* @link sqlite3.class.constants.drop-temp-index
*/
/** @cvalue SQLITE_DROP_TEMP_INDEX */
public const int DROP_TEMP_INDEX = UNKNOWN;
/**
* @cvalue SQLITE_DROP_TEMP_TABLE
* @link sqlite3.class.constants.drop-temp-table
*/
/** @cvalue SQLITE_DROP_TEMP_TABLE */
public const int DROP_TEMP_TABLE = UNKNOWN;
/**
* @cvalue SQLITE_DROP_TEMP_TRIGGER
* @link sqlite3.class.constants.drop-temp-trigger
*/
/** @cvalue SQLITE_DROP_TEMP_TRIGGER */
public const int DROP_TEMP_TRIGGER = UNKNOWN;
/**
* @cvalue SQLITE_DROP_TEMP_VIEW
* @link sqlite3.class.constants.drop-temp-view
*/
/** @cvalue SQLITE_DROP_TEMP_VIEW */
public const int DROP_TEMP_VIEW = UNKNOWN;
/**
* @cvalue SQLITE_DROP_TRIGGER
* @link sqlite3.class.constants.drop-trigger
*/
/** @cvalue SQLITE_DROP_TRIGGER */
public const int DROP_TRIGGER = UNKNOWN;
/**
* @cvalue SQLITE_DROP_VIEW
* @link sqlite3.class.constants.drop-view
*/
/** @cvalue SQLITE_DROP_VIEW */
public const int DROP_VIEW = UNKNOWN;
/**
* @cvalue SQLITE_INSERT
* @link sqlite3.class.constants.insert
*/
/** @cvalue SQLITE_INSERT */
public const int INSERT = UNKNOWN;
/**
* @cvalue SQLITE_PRAGMA
* @link sqlite3.class.constants.pragma
*/
/** @cvalue SQLITE_PRAGMA */
public const int PRAGMA = UNKNOWN;
/**
* @cvalue SQLITE_READ
* @link sqlite3.class.constants.read
*/
/** @cvalue SQLITE_READ */
public const int READ = UNKNOWN;
/**
* @cvalue SQLITE_SELECT
* @link sqlite3.class.constants.select
*/
/** @cvalue SQLITE_SELECT */
public const int SELECT = UNKNOWN;
/**
* @cvalue SQLITE_TRANSACTION
* @link sqlite3.class.constants.transaction
*/
/** @cvalue SQLITE_TRANSACTION */
public const int TRANSACTION = UNKNOWN;
/**
* @cvalue SQLITE_UPDATE
* @link sqlite3.class.constants.update
*/
/** @cvalue SQLITE_UPDATE */
public const int UPDATE = UNKNOWN;
/**
* @cvalue SQLITE_ATTACH
* @link sqlite3.class.constants.attach
*/
/** @cvalue SQLITE_ATTACH */
public const int ATTACH = UNKNOWN;
/**
* @cvalue SQLITE_DETACH
* @link sqlite3.class.constants.detach
*/
/** @cvalue SQLITE_DETACH */
public const int DETACH = UNKNOWN;
/**
* @cvalue SQLITE_ALTER_TABLE
* @link sqlite3.class.constants.alter-table
*/
/** @cvalue SQLITE_ALTER_TABLE */
public const int ALTER_TABLE = UNKNOWN;
/**
* @cvalue SQLITE_REINDEX
* @link sqlite3.class.constants.reindex
*/
/** @cvalue SQLITE_REINDEX */
public const int REINDEX = UNKNOWN;
/**
* @cvalue SQLITE_ANALYZE
* @link sqlite3.class.constants.analyze
*/
/** @cvalue SQLITE_ANALYZE */
public const int ANALYZE = UNKNOWN;
/**
* @cvalue SQLITE_CREATE_VTABLE
* @link sqlite3.class.constants.create-vtable
*/
/** @cvalue SQLITE_CREATE_VTABLE */
public const int CREATE_VTABLE = UNKNOWN;
/**
* @cvalue SQLITE_DROP_VTABLE
* @link sqlite3.class.constants.drop-vtable
*/
/** @cvalue SQLITE_DROP_VTABLE */
public const int DROP_VTABLE = UNKNOWN;
/**
* @cvalue SQLITE_FUNCTION
* @link sqlite3.class.constants.function
*/
/** @cvalue SQLITE_FUNCTION */
public const int FUNCTION = UNKNOWN;
/**
* @cvalue SQLITE_SAVEPOINT
* @link sqlite3.class.constants.savepoint
*/
/** @cvalue SQLITE_SAVEPOINT */
public const int SAVEPOINT = UNKNOWN;
/**
* @cvalue SQLITE_COPY
* @link sqlite3.class.constants.copy
*/
/** @cvalue SQLITE_COPY */
public const int COPY = UNKNOWN;
#ifdef SQLITE_RECURSIVE
/**
* @cvalue SQLITE_RECURSIVE
* @link sqlite3.class.constants.recursive
*/
/** @cvalue SQLITE_RECURSIVE */
public const int RECURSIVE = UNKNOWN;
#endif

Expand Down
2 changes: 1 addition & 1 deletion ext/sqlite3/sqlite3_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading