From 5d3100beedb797adc72eab7e927eb46336e7d9e9 Mon Sep 17 00:00:00 2001 From: Jorg Adam Sowa Date: Wed, 4 Oct 2023 21:23:39 +0200 Subject: [PATCH 1/3] Typed constants in SPL extension --- ext/spl/spl_array.stub.php | 15 ++---- ext/spl/spl_array_arginfo.h | 12 ++--- ext/spl/spl_directory.stub.php | 48 +++++++------------ ext/spl/spl_directory_arginfo.h | 34 +++++++------- ext/spl/spl_dllist.stub.php | 12 ++--- ext/spl/spl_dllist_arginfo.h | 10 ++-- ext/spl/spl_heap.stub.php | 9 ++-- ext/spl/spl_heap_arginfo.h | 8 ++-- ext/spl/spl_iterators.stub.php | 81 +++++++++++++-------------------- ext/spl/spl_iterators_arginfo.h | 52 ++++++++++----------- ext/spl/spl_observer.stub.php | 12 ++--- ext/spl/spl_observer_arginfo.h | 10 ++-- 12 files changed, 126 insertions(+), 177 deletions(-) diff --git a/ext/spl/spl_array.stub.php b/ext/spl/spl_array.stub.php index 8841fb351aefa..f22fd8b68e0fe 100644 --- a/ext/spl/spl_array.stub.php +++ b/ext/spl/spl_array.stub.php @@ -5,15 +5,13 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable { /** - * @var int * @cvalue SPL_ARRAY_STD_PROP_LIST */ - const STD_PROP_LIST = UNKNOWN; + public const int STD_PROP_LIST = UNKNOWN; /** - * @var int * @cvalue SPL_ARRAY_ARRAY_AS_PROPS */ - const ARRAY_AS_PROPS = UNKNOWN; + public const int ARRAY_AS_PROPS = UNKNOWN; public function __construct(array|object $array = [], int $flags = 0, string $iteratorClass = ArrayIterator::class) {} @@ -93,15 +91,13 @@ public function __debugInfo(): array {} class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Countable { /** - * @var int * @cvalue SPL_ARRAY_STD_PROP_LIST */ - public const STD_PROP_LIST = UNKNOWN; + public const int STD_PROP_LIST = UNKNOWN; /** - * @var int * @cvalue SPL_ARRAY_ARRAY_AS_PROPS */ - public const ARRAY_AS_PROPS = UNKNOWN; + public const int ARRAY_AS_PROPS = UNKNOWN; public function __construct(array|object $array = [], int $flags = 0) {} @@ -247,10 +243,9 @@ public function __debugInfo(): array {} class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator { /** - * @var int * @cvalue SPL_ARRAY_CHILD_ARRAYS_ONLY */ - public const CHILD_ARRAYS_ONLY = UNKNOWN; + public const int CHILD_ARRAYS_ONLY = UNKNOWN; /** @tentative-return-type */ public function hasChildren(): bool {} diff --git a/ext/spl/spl_array_arginfo.h b/ext/spl/spl_array_arginfo.h index de2ec5f1efb04..1ec6511ba3050 100644 --- a/ext/spl/spl_array_arginfo.h +++ b/ext/spl/spl_array_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d0ce4612e25d2b8a765544c835fa2347ae9b23f2 */ + * Stub hash: 760b6a074aeaa14a1e560081e5e9f70f462274b2 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject___construct, 0, 0, 0) ZEND_ARG_TYPE_MASK(0, array, MAY_BE_ARRAY|MAY_BE_OBJECT, "[]") @@ -269,13 +269,13 @@ static zend_class_entry *register_class_ArrayObject(zend_class_entry *class_entr zval const_STD_PROP_LIST_value; ZVAL_LONG(&const_STD_PROP_LIST_value, SPL_ARRAY_STD_PROP_LIST); zend_string *const_STD_PROP_LIST_name = zend_string_init_interned("STD_PROP_LIST", sizeof("STD_PROP_LIST") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_STD_PROP_LIST_name, &const_STD_PROP_LIST_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_STD_PROP_LIST_name, &const_STD_PROP_LIST_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_STD_PROP_LIST_name); zval const_ARRAY_AS_PROPS_value; ZVAL_LONG(&const_ARRAY_AS_PROPS_value, SPL_ARRAY_ARRAY_AS_PROPS); zend_string *const_ARRAY_AS_PROPS_name = zend_string_init_interned("ARRAY_AS_PROPS", sizeof("ARRAY_AS_PROPS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ARRAY_AS_PROPS_name, &const_ARRAY_AS_PROPS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ARRAY_AS_PROPS_name, &const_ARRAY_AS_PROPS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ARRAY_AS_PROPS_name); return class_entry; @@ -292,13 +292,13 @@ static zend_class_entry *register_class_ArrayIterator(zend_class_entry *class_en zval const_STD_PROP_LIST_value; ZVAL_LONG(&const_STD_PROP_LIST_value, SPL_ARRAY_STD_PROP_LIST); zend_string *const_STD_PROP_LIST_name = zend_string_init_interned("STD_PROP_LIST", sizeof("STD_PROP_LIST") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_STD_PROP_LIST_name, &const_STD_PROP_LIST_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_STD_PROP_LIST_name, &const_STD_PROP_LIST_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_STD_PROP_LIST_name); zval const_ARRAY_AS_PROPS_value; ZVAL_LONG(&const_ARRAY_AS_PROPS_value, SPL_ARRAY_ARRAY_AS_PROPS); zend_string *const_ARRAY_AS_PROPS_name = zend_string_init_interned("ARRAY_AS_PROPS", sizeof("ARRAY_AS_PROPS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ARRAY_AS_PROPS_name, &const_ARRAY_AS_PROPS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ARRAY_AS_PROPS_name, &const_ARRAY_AS_PROPS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ARRAY_AS_PROPS_name); return class_entry; @@ -315,7 +315,7 @@ static zend_class_entry *register_class_RecursiveArrayIterator(zend_class_entry zval const_CHILD_ARRAYS_ONLY_value; ZVAL_LONG(&const_CHILD_ARRAYS_ONLY_value, SPL_ARRAY_CHILD_ARRAYS_ONLY); zend_string *const_CHILD_ARRAYS_ONLY_name = zend_string_init_interned("CHILD_ARRAYS_ONLY", sizeof("CHILD_ARRAYS_ONLY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CHILD_ARRAYS_ONLY_name, &const_CHILD_ARRAYS_ONLY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CHILD_ARRAYS_ONLY_name, &const_CHILD_ARRAYS_ONLY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CHILD_ARRAYS_ONLY_name); return class_entry; diff --git a/ext/spl/spl_directory.stub.php b/ext/spl/spl_directory.stub.php index d11c9b50daf9d..4ceaa74748373 100644 --- a/ext/spl/spl_directory.stub.php +++ b/ext/spl/spl_directory.stub.php @@ -151,65 +151,53 @@ public function __toString(): string {} class FilesystemIterator extends DirectoryIterator { /** - * @var int * @cvalue SPL_FILE_DIR_CURRENT_MODE_MASK */ - public const CURRENT_MODE_MASK = UNKNOWN; + public const int CURRENT_MODE_MASK = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_CURRENT_AS_PATHNAME */ - public const CURRENT_AS_PATHNAME = UNKNOWN; + public const int CURRENT_AS_PATHNAME = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_CURRENT_AS_FILEINFO */ - public const CURRENT_AS_FILEINFO = UNKNOWN; + public const int CURRENT_AS_FILEINFO = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_CURRENT_AS_SELF */ - public const CURRENT_AS_SELF = UNKNOWN; + public const int CURRENT_AS_SELF = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_KEY_MODE_MASK */ - public const KEY_MODE_MASK = UNKNOWN; + public const int KEY_MODE_MASK = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_KEY_AS_PATHNAME */ - public const KEY_AS_PATHNAME = UNKNOWN; + public const int KEY_AS_PATHNAME = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_FOLLOW_SYMLINKS */ - public const FOLLOW_SYMLINKS = UNKNOWN; + public const int FOLLOW_SYMLINKS = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_KEY_AS_FILENAME */ - public const KEY_AS_FILENAME = UNKNOWN; + public const int KEY_AS_FILENAME = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_NEW_CURRENT_AND_KEY */ - public const NEW_CURRENT_AND_KEY = UNKNOWN; + public const int NEW_CURRENT_AND_KEY = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_OTHERS_MASK */ - public const OTHER_MODE_MASK = UNKNOWN; + public const int OTHER_MODE_MASK = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_SKIPDOTS */ - public const SKIP_DOTS = UNKNOWN; + public const int SKIP_DOTS = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_DIR_UNIXPATHS */ - public const UNIX_PATHS = UNKNOWN; + public const int UNIX_PATHS = UNKNOWN; public function __construct(string $directory, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS) {} @@ -259,25 +247,21 @@ public function count(): int {} class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIterator { /** - * @var int * @cvalue SPL_FILE_OBJECT_DROP_NEW_LINE */ - public const DROP_NEW_LINE = UNKNOWN; + public const int DROP_NEW_LINE = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_OBJECT_READ_AHEAD */ - public const READ_AHEAD = UNKNOWN; + public const int READ_AHEAD = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_OBJECT_SKIP_EMPTY */ - public const SKIP_EMPTY = UNKNOWN; + public const int SKIP_EMPTY = UNKNOWN; /** - * @var int * @cvalue SPL_FILE_OBJECT_READ_CSV */ - public const READ_CSV = UNKNOWN; + public const int READ_CSV = UNKNOWN; /** @param resource|null $context */ public function __construct(string $filename, string $mode = "r", bool $useIncludePath = false, $context = null) {} diff --git a/ext/spl/spl_directory_arginfo.h b/ext/spl/spl_directory_arginfo.h index 99a6e0b854421..9e6816e0eff60 100644 --- a/ext/spl/spl_directory_arginfo.h +++ b/ext/spl/spl_directory_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7e67d07b6079c39a091e91dfddfbe7170067955e */ + * Stub hash: fb9baab6b43b84bdcda6b2ed4b4d393cda26baa8 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileInfo___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -523,73 +523,73 @@ static zend_class_entry *register_class_FilesystemIterator(zend_class_entry *cla zval const_CURRENT_MODE_MASK_value; ZVAL_LONG(&const_CURRENT_MODE_MASK_value, SPL_FILE_DIR_CURRENT_MODE_MASK); zend_string *const_CURRENT_MODE_MASK_name = zend_string_init_interned("CURRENT_MODE_MASK", sizeof("CURRENT_MODE_MASK") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CURRENT_MODE_MASK_name, &const_CURRENT_MODE_MASK_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CURRENT_MODE_MASK_name, &const_CURRENT_MODE_MASK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CURRENT_MODE_MASK_name); zval const_CURRENT_AS_PATHNAME_value; ZVAL_LONG(&const_CURRENT_AS_PATHNAME_value, SPL_FILE_DIR_CURRENT_AS_PATHNAME); zend_string *const_CURRENT_AS_PATHNAME_name = zend_string_init_interned("CURRENT_AS_PATHNAME", sizeof("CURRENT_AS_PATHNAME") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CURRENT_AS_PATHNAME_name, &const_CURRENT_AS_PATHNAME_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CURRENT_AS_PATHNAME_name, &const_CURRENT_AS_PATHNAME_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CURRENT_AS_PATHNAME_name); zval const_CURRENT_AS_FILEINFO_value; ZVAL_LONG(&const_CURRENT_AS_FILEINFO_value, SPL_FILE_DIR_CURRENT_AS_FILEINFO); zend_string *const_CURRENT_AS_FILEINFO_name = zend_string_init_interned("CURRENT_AS_FILEINFO", sizeof("CURRENT_AS_FILEINFO") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CURRENT_AS_FILEINFO_name, &const_CURRENT_AS_FILEINFO_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CURRENT_AS_FILEINFO_name, &const_CURRENT_AS_FILEINFO_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CURRENT_AS_FILEINFO_name); zval const_CURRENT_AS_SELF_value; ZVAL_LONG(&const_CURRENT_AS_SELF_value, SPL_FILE_DIR_CURRENT_AS_SELF); zend_string *const_CURRENT_AS_SELF_name = zend_string_init_interned("CURRENT_AS_SELF", sizeof("CURRENT_AS_SELF") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CURRENT_AS_SELF_name, &const_CURRENT_AS_SELF_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CURRENT_AS_SELF_name, &const_CURRENT_AS_SELF_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CURRENT_AS_SELF_name); zval const_KEY_MODE_MASK_value; ZVAL_LONG(&const_KEY_MODE_MASK_value, SPL_FILE_DIR_KEY_MODE_MASK); zend_string *const_KEY_MODE_MASK_name = zend_string_init_interned("KEY_MODE_MASK", sizeof("KEY_MODE_MASK") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_KEY_MODE_MASK_name, &const_KEY_MODE_MASK_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_KEY_MODE_MASK_name, &const_KEY_MODE_MASK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_KEY_MODE_MASK_name); zval const_KEY_AS_PATHNAME_value; ZVAL_LONG(&const_KEY_AS_PATHNAME_value, SPL_FILE_DIR_KEY_AS_PATHNAME); zend_string *const_KEY_AS_PATHNAME_name = zend_string_init_interned("KEY_AS_PATHNAME", sizeof("KEY_AS_PATHNAME") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_KEY_AS_PATHNAME_name, &const_KEY_AS_PATHNAME_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_KEY_AS_PATHNAME_name, &const_KEY_AS_PATHNAME_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_KEY_AS_PATHNAME_name); zval const_FOLLOW_SYMLINKS_value; ZVAL_LONG(&const_FOLLOW_SYMLINKS_value, SPL_FILE_DIR_FOLLOW_SYMLINKS); zend_string *const_FOLLOW_SYMLINKS_name = zend_string_init_interned("FOLLOW_SYMLINKS", sizeof("FOLLOW_SYMLINKS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FOLLOW_SYMLINKS_name, &const_FOLLOW_SYMLINKS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FOLLOW_SYMLINKS_name, &const_FOLLOW_SYMLINKS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FOLLOW_SYMLINKS_name); zval const_KEY_AS_FILENAME_value; ZVAL_LONG(&const_KEY_AS_FILENAME_value, SPL_FILE_DIR_KEY_AS_FILENAME); zend_string *const_KEY_AS_FILENAME_name = zend_string_init_interned("KEY_AS_FILENAME", sizeof("KEY_AS_FILENAME") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_KEY_AS_FILENAME_name, &const_KEY_AS_FILENAME_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_KEY_AS_FILENAME_name, &const_KEY_AS_FILENAME_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_KEY_AS_FILENAME_name); zval const_NEW_CURRENT_AND_KEY_value; ZVAL_LONG(&const_NEW_CURRENT_AND_KEY_value, SPL_FILE_NEW_CURRENT_AND_KEY); zend_string *const_NEW_CURRENT_AND_KEY_name = zend_string_init_interned("NEW_CURRENT_AND_KEY", sizeof("NEW_CURRENT_AND_KEY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_NEW_CURRENT_AND_KEY_name, &const_NEW_CURRENT_AND_KEY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_NEW_CURRENT_AND_KEY_name, &const_NEW_CURRENT_AND_KEY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_NEW_CURRENT_AND_KEY_name); zval const_OTHER_MODE_MASK_value; ZVAL_LONG(&const_OTHER_MODE_MASK_value, SPL_FILE_DIR_OTHERS_MASK); zend_string *const_OTHER_MODE_MASK_name = zend_string_init_interned("OTHER_MODE_MASK", sizeof("OTHER_MODE_MASK") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OTHER_MODE_MASK_name, &const_OTHER_MODE_MASK_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OTHER_MODE_MASK_name, &const_OTHER_MODE_MASK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OTHER_MODE_MASK_name); zval const_SKIP_DOTS_value; ZVAL_LONG(&const_SKIP_DOTS_value, SPL_FILE_DIR_SKIPDOTS); zend_string *const_SKIP_DOTS_name = zend_string_init_interned("SKIP_DOTS", sizeof("SKIP_DOTS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_SKIP_DOTS_name, &const_SKIP_DOTS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_SKIP_DOTS_name, &const_SKIP_DOTS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_SKIP_DOTS_name); zval const_UNIX_PATHS_value; ZVAL_LONG(&const_UNIX_PATHS_value, SPL_FILE_DIR_UNIXPATHS); zend_string *const_UNIX_PATHS_name = zend_string_init_interned("UNIX_PATHS", sizeof("UNIX_PATHS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_UNIX_PATHS_name, &const_UNIX_PATHS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_UNIX_PATHS_name, &const_UNIX_PATHS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_UNIX_PATHS_name); return class_entry; @@ -630,25 +630,25 @@ static zend_class_entry *register_class_SplFileObject(zend_class_entry *class_en zval const_DROP_NEW_LINE_value; ZVAL_LONG(&const_DROP_NEW_LINE_value, SPL_FILE_OBJECT_DROP_NEW_LINE); zend_string *const_DROP_NEW_LINE_name = zend_string_init_interned("DROP_NEW_LINE", sizeof("DROP_NEW_LINE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_DROP_NEW_LINE_name, &const_DROP_NEW_LINE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_DROP_NEW_LINE_name, &const_DROP_NEW_LINE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_DROP_NEW_LINE_name); zval const_READ_AHEAD_value; ZVAL_LONG(&const_READ_AHEAD_value, SPL_FILE_OBJECT_READ_AHEAD); zend_string *const_READ_AHEAD_name = zend_string_init_interned("READ_AHEAD", sizeof("READ_AHEAD") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_READ_AHEAD_name, &const_READ_AHEAD_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_READ_AHEAD_name, &const_READ_AHEAD_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_READ_AHEAD_name); zval const_SKIP_EMPTY_value; ZVAL_LONG(&const_SKIP_EMPTY_value, SPL_FILE_OBJECT_SKIP_EMPTY); zend_string *const_SKIP_EMPTY_name = zend_string_init_interned("SKIP_EMPTY", sizeof("SKIP_EMPTY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_SKIP_EMPTY_name, &const_SKIP_EMPTY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_SKIP_EMPTY_name, &const_SKIP_EMPTY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_SKIP_EMPTY_name); zval const_READ_CSV_value; ZVAL_LONG(&const_READ_CSV_value, SPL_FILE_OBJECT_READ_CSV); zend_string *const_READ_CSV_name = zend_string_init_interned("READ_CSV", sizeof("READ_CSV") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_READ_CSV_name, &const_READ_CSV_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_READ_CSV_name, &const_READ_CSV_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_READ_CSV_name); return class_entry; diff --git a/ext/spl/spl_dllist.stub.php b/ext/spl/spl_dllist.stub.php index 8083889f8de36..62039ea60ffa1 100644 --- a/ext/spl/spl_dllist.stub.php +++ b/ext/spl/spl_dllist.stub.php @@ -5,25 +5,21 @@ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializable { /** - * @var int * @cvalue SPL_DLLIST_IT_LIFO */ - public const IT_MODE_LIFO = UNKNOWN; + public const int IT_MODE_LIFO = UNKNOWN; /** - * @var int * @cvalue SPL_DLLIST_IT_FIFO */ - public const IT_MODE_FIFO = UNKNOWN; + public const int IT_MODE_FIFO = UNKNOWN; /** - * @var int * @cvalue SPL_DLLIST_IT_DELETE */ - public const IT_MODE_DELETE = UNKNOWN; + public const int IT_MODE_DELETE = UNKNOWN; /** - * @var int * @cvalue SPL_DLLIST_IT_KEEP */ - public const IT_MODE_KEEP = UNKNOWN; + public const int IT_MODE_KEEP = UNKNOWN; /** @tentative-return-type */ public function add(int $index, mixed $value): void {} diff --git a/ext/spl/spl_dllist_arginfo.h b/ext/spl/spl_dllist_arginfo.h index 13cab9a6af3ca..3ef8355ef2e63 100644 --- a/ext/spl/spl_dllist_arginfo.h +++ b/ext/spl/spl_dllist_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b88d228873f2d8e0caa583fd80c70ce2bfc51188 */ + * Stub hash: 9969bd9f785db905720950ae349b903ec80d1f75 */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplDoublyLinkedList_add, 0, 2, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) @@ -165,25 +165,25 @@ static zend_class_entry *register_class_SplDoublyLinkedList(zend_class_entry *cl zval const_IT_MODE_LIFO_value; ZVAL_LONG(&const_IT_MODE_LIFO_value, SPL_DLLIST_IT_LIFO); zend_string *const_IT_MODE_LIFO_name = zend_string_init_interned("IT_MODE_LIFO", sizeof("IT_MODE_LIFO") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_IT_MODE_LIFO_name, &const_IT_MODE_LIFO_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_IT_MODE_LIFO_name, &const_IT_MODE_LIFO_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_IT_MODE_LIFO_name); zval const_IT_MODE_FIFO_value; ZVAL_LONG(&const_IT_MODE_FIFO_value, SPL_DLLIST_IT_FIFO); zend_string *const_IT_MODE_FIFO_name = zend_string_init_interned("IT_MODE_FIFO", sizeof("IT_MODE_FIFO") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_IT_MODE_FIFO_name, &const_IT_MODE_FIFO_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_IT_MODE_FIFO_name, &const_IT_MODE_FIFO_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_IT_MODE_FIFO_name); zval const_IT_MODE_DELETE_value; ZVAL_LONG(&const_IT_MODE_DELETE_value, SPL_DLLIST_IT_DELETE); zend_string *const_IT_MODE_DELETE_name = zend_string_init_interned("IT_MODE_DELETE", sizeof("IT_MODE_DELETE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_IT_MODE_DELETE_name, &const_IT_MODE_DELETE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_IT_MODE_DELETE_name, &const_IT_MODE_DELETE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_IT_MODE_DELETE_name); zval const_IT_MODE_KEEP_value; ZVAL_LONG(&const_IT_MODE_KEEP_value, SPL_DLLIST_IT_KEEP); zend_string *const_IT_MODE_KEEP_name = zend_string_init_interned("IT_MODE_KEEP", sizeof("IT_MODE_KEEP") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_IT_MODE_KEEP_name, &const_IT_MODE_KEEP_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_IT_MODE_KEEP_name, &const_IT_MODE_KEEP_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_IT_MODE_KEEP_name); return class_entry; diff --git a/ext/spl/spl_heap.stub.php b/ext/spl/spl_heap.stub.php index a1b4dfdbde318..3dbf8928a05f1 100644 --- a/ext/spl/spl_heap.stub.php +++ b/ext/spl/spl_heap.stub.php @@ -5,20 +5,17 @@ class SplPriorityQueue implements Iterator, Countable { /** - * @var int * @cvalue SPL_PQUEUE_EXTR_BOTH */ - public const EXTR_BOTH = UNKNOWN; + public const int EXTR_BOTH = UNKNOWN; /** - * @var int * @cvalue SPL_PQUEUE_EXTR_PRIORITY */ - public const EXTR_PRIORITY = UNKNOWN; + public const int EXTR_PRIORITY = UNKNOWN; /** - * @var int * @cvalue SPL_PQUEUE_EXTR_DATA */ - public const EXTR_DATA = UNKNOWN; + public const int EXTR_DATA = UNKNOWN; /** @tentative-return-type */ public function compare(mixed $priority1, mixed $priority2): int {} diff --git a/ext/spl/spl_heap_arginfo.h b/ext/spl/spl_heap_arginfo.h index 99eda7e079359..c4a10e0936d37 100644 --- a/ext/spl/spl_heap_arginfo.h +++ b/ext/spl/spl_heap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4045035ec5bee0f951fa31df75c3f42c31bd8be2 */ + * Stub hash: 92e2832ff549af1b36bd8747a89db2fef3778083 */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplPriorityQueue_compare, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, priority1, IS_MIXED, 0) @@ -172,19 +172,19 @@ static zend_class_entry *register_class_SplPriorityQueue(zend_class_entry *class zval const_EXTR_BOTH_value; ZVAL_LONG(&const_EXTR_BOTH_value, SPL_PQUEUE_EXTR_BOTH); zend_string *const_EXTR_BOTH_name = zend_string_init_interned("EXTR_BOTH", sizeof("EXTR_BOTH") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EXTR_BOTH_name, &const_EXTR_BOTH_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EXTR_BOTH_name, &const_EXTR_BOTH_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EXTR_BOTH_name); zval const_EXTR_PRIORITY_value; ZVAL_LONG(&const_EXTR_PRIORITY_value, SPL_PQUEUE_EXTR_PRIORITY); zend_string *const_EXTR_PRIORITY_name = zend_string_init_interned("EXTR_PRIORITY", sizeof("EXTR_PRIORITY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EXTR_PRIORITY_name, &const_EXTR_PRIORITY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EXTR_PRIORITY_name, &const_EXTR_PRIORITY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EXTR_PRIORITY_name); zval const_EXTR_DATA_value; ZVAL_LONG(&const_EXTR_DATA_value, SPL_PQUEUE_EXTR_DATA); zend_string *const_EXTR_DATA_name = zend_string_init_interned("EXTR_DATA", sizeof("EXTR_DATA") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EXTR_DATA_name, &const_EXTR_DATA_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EXTR_DATA_name, &const_EXTR_DATA_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EXTR_DATA_name); return class_entry; diff --git a/ext/spl/spl_iterators.stub.php b/ext/spl/spl_iterators.stub.php index f17a62bf58eec..34f104110e13b 100644 --- a/ext/spl/spl_iterators.stub.php +++ b/ext/spl/spl_iterators.stub.php @@ -54,25 +54,21 @@ public function getChildren(): ?RecursiveIterator; class RecursiveIteratorIterator implements OuterIterator { /** - * @var int * @cvalue RIT_LEAVES_ONLY */ - public const LEAVES_ONLY = UNKNOWN; + public const int LEAVES_ONLY = UNKNOWN; /** - * @var int * @cvalue RIT_SELF_FIRST */ - public const SELF_FIRST = UNKNOWN; + public const int SELF_FIRST = UNKNOWN; /** - * @var int * @cvalue RIT_CHILD_FIRST */ - public const CHILD_FIRST = UNKNOWN; + public const int CHILD_FIRST = UNKNOWN; /** - * @var int * @cvalue RIT_CATCH_GET_CHILD */ - public const CATCH_GET_CHILD = UNKNOWN; + public const int CATCH_GET_CHILD = UNKNOWN; public function __construct(Traversable $iterator, int $mode = RecursiveIteratorIterator::LEAVES_ONLY, int $flags = 0) {} @@ -222,35 +218,29 @@ public function getPosition(): int {} class CachingIterator extends IteratorIterator implements ArrayAccess, Countable, Stringable { /** - * @var int * @cvalue CIT_CALL_TOSTRING */ - public const CALL_TOSTRING = UNKNOWN; + public const int CALL_TOSTRING = UNKNOWN; /** - * @var int * @cvalue CIT_CATCH_GET_CHILD */ - public const CATCH_GET_CHILD = UNKNOWN; + public const int CATCH_GET_CHILD = UNKNOWN; /** - * @var int * @cvalue CIT_TOSTRING_USE_KEY */ - public const TOSTRING_USE_KEY = UNKNOWN; + public const int TOSTRING_USE_KEY = UNKNOWN; /** - * @var int * @cvalue CIT_TOSTRING_USE_CURRENT */ - public const TOSTRING_USE_CURRENT = UNKNOWN; + public const int TOSTRING_USE_CURRENT = UNKNOWN; /** - * @var int * @cvalue CIT_TOSTRING_USE_INNER */ - public const TOSTRING_USE_INNER = UNKNOWN; + public const int TOSTRING_USE_INNER = UNKNOWN; /** - * @var int * @cvalue CIT_FULL_CACHE */ - public const FULL_CACHE = UNKNOWN; + public const int FULL_CACHE = UNKNOWN; public function __construct(Iterator $iterator, int $flags = CachingIterator::CALL_TOSTRING) {} @@ -373,40 +363,33 @@ public function next(): void {} class RegexIterator extends FilterIterator { /** - * @var int * @cvalue REGIT_USE_KEY */ - public const USE_KEY = UNKNOWN; + public const int USE_KEY = UNKNOWN; /** - * @var int * @cvalue REGIT_INVERTED */ - public const INVERT_MATCH = UNKNOWN; + public const int INVERT_MATCH = UNKNOWN; /** - * @var int * @cvalue REGIT_MODE_MATCH */ - public const MATCH = UNKNOWN; + public const int MATCH = UNKNOWN; /** - * @var int * @cvalue REGIT_MODE_GET_MATCH */ - public const GET_MATCH = UNKNOWN; + public const int GET_MATCH = UNKNOWN; /** - * @var int * @cvalue REGIT_MODE_ALL_MATCHES */ - public const ALL_MATCHES = UNKNOWN; + public const int ALL_MATCHES = UNKNOWN; /** - * @var int * @cvalue REGIT_MODE_SPLIT */ - public const SPLIT = UNKNOWN; + public const int SPLIT = UNKNOWN; /** - * @var int * @cvalue REGIT_MODE_REPLACE */ - public const REPLACE = UNKNOWN; + public const int REPLACE = UNKNOWN; public ?string $replacement = null; @@ -457,27 +440,25 @@ public function getChildren(): RecursiveRegexIterator {} class RecursiveTreeIterator extends RecursiveIteratorIterator { /** - * @var int * @cvalue RTIT_BYPASS_CURRENT */ - public const BYPASS_CURRENT = UNKNOWN; + public const int BYPASS_CURRENT = UNKNOWN; /** - * @var int * @cvalue RTIT_BYPASS_KEY */ - public const BYPASS_KEY = UNKNOWN; - /** @var int */ - public const PREFIX_LEFT = 0; - /** @var int */ - public const PREFIX_MID_HAS_NEXT = 1; - /** @var int */ - public const PREFIX_MID_LAST = 2; - /** @var int */ - public const PREFIX_END_HAS_NEXT = 3; - /** @var int */ - public const PREFIX_END_LAST = 4; - /** @var int */ - public const PREFIX_RIGHT = 5; + public const int BYPASS_KEY = UNKNOWN; + + public const int PREFIX_LEFT = 0; + + public const int PREFIX_MID_HAS_NEXT = 1; + + public const int PREFIX_MID_LAST = 2; + + public const int PREFIX_END_HAS_NEXT = 3; + + public const int PREFIX_END_LAST = 4; + + public const int PREFIX_RIGHT = 5; /** @param RecursiveIterator|IteratorAggregate $iterator */ public function __construct( diff --git a/ext/spl/spl_iterators_arginfo.h b/ext/spl/spl_iterators_arginfo.h index a55b8d0ca9ed1..4c9cac4cf43f3 100644 --- a/ext/spl/spl_iterators_arginfo.h +++ b/ext/spl/spl_iterators_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c01ba2e6ccaad6db28cc6f42d679dc753be57187 */ + * Stub hash: 1fc04f2fd79b5657fc56f1a0bc44978fdba04406 */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_EmptyIterator_current, 0, 0, IS_NEVER, 0) ZEND_END_ARG_INFO() @@ -675,25 +675,25 @@ static zend_class_entry *register_class_RecursiveIteratorIterator(zend_class_ent zval const_LEAVES_ONLY_value; ZVAL_LONG(&const_LEAVES_ONLY_value, RIT_LEAVES_ONLY); zend_string *const_LEAVES_ONLY_name = zend_string_init_interned("LEAVES_ONLY", sizeof("LEAVES_ONLY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_LEAVES_ONLY_name, &const_LEAVES_ONLY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_LEAVES_ONLY_name, &const_LEAVES_ONLY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_LEAVES_ONLY_name); zval const_SELF_FIRST_value; ZVAL_LONG(&const_SELF_FIRST_value, RIT_SELF_FIRST); zend_string *const_SELF_FIRST_name = zend_string_init_interned("SELF_FIRST", sizeof("SELF_FIRST") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_SELF_FIRST_name, &const_SELF_FIRST_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_SELF_FIRST_name, &const_SELF_FIRST_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_SELF_FIRST_name); zval const_CHILD_FIRST_value; ZVAL_LONG(&const_CHILD_FIRST_value, RIT_CHILD_FIRST); zend_string *const_CHILD_FIRST_name = zend_string_init_interned("CHILD_FIRST", sizeof("CHILD_FIRST") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CHILD_FIRST_name, &const_CHILD_FIRST_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CHILD_FIRST_name, &const_CHILD_FIRST_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CHILD_FIRST_name); zval const_CATCH_GET_CHILD_value; ZVAL_LONG(&const_CATCH_GET_CHILD_value, RIT_CATCH_GET_CHILD); zend_string *const_CATCH_GET_CHILD_name = zend_string_init_interned("CATCH_GET_CHILD", sizeof("CATCH_GET_CHILD") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CATCH_GET_CHILD_name, &const_CATCH_GET_CHILD_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CATCH_GET_CHILD_name, &const_CATCH_GET_CHILD_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CATCH_GET_CHILD_name); return class_entry; @@ -786,37 +786,37 @@ static zend_class_entry *register_class_CachingIterator(zend_class_entry *class_ zval const_CALL_TOSTRING_value; ZVAL_LONG(&const_CALL_TOSTRING_value, CIT_CALL_TOSTRING); zend_string *const_CALL_TOSTRING_name = zend_string_init_interned("CALL_TOSTRING", sizeof("CALL_TOSTRING") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CALL_TOSTRING_name, &const_CALL_TOSTRING_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CALL_TOSTRING_name, &const_CALL_TOSTRING_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CALL_TOSTRING_name); zval const_CATCH_GET_CHILD_value; ZVAL_LONG(&const_CATCH_GET_CHILD_value, CIT_CATCH_GET_CHILD); zend_string *const_CATCH_GET_CHILD_name = zend_string_init_interned("CATCH_GET_CHILD", sizeof("CATCH_GET_CHILD") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CATCH_GET_CHILD_name, &const_CATCH_GET_CHILD_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CATCH_GET_CHILD_name, &const_CATCH_GET_CHILD_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CATCH_GET_CHILD_name); zval const_TOSTRING_USE_KEY_value; ZVAL_LONG(&const_TOSTRING_USE_KEY_value, CIT_TOSTRING_USE_KEY); zend_string *const_TOSTRING_USE_KEY_name = zend_string_init_interned("TOSTRING_USE_KEY", sizeof("TOSTRING_USE_KEY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_TOSTRING_USE_KEY_name, &const_TOSTRING_USE_KEY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_TOSTRING_USE_KEY_name, &const_TOSTRING_USE_KEY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_TOSTRING_USE_KEY_name); zval const_TOSTRING_USE_CURRENT_value; ZVAL_LONG(&const_TOSTRING_USE_CURRENT_value, CIT_TOSTRING_USE_CURRENT); zend_string *const_TOSTRING_USE_CURRENT_name = zend_string_init_interned("TOSTRING_USE_CURRENT", sizeof("TOSTRING_USE_CURRENT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_TOSTRING_USE_CURRENT_name, &const_TOSTRING_USE_CURRENT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_TOSTRING_USE_CURRENT_name, &const_TOSTRING_USE_CURRENT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_TOSTRING_USE_CURRENT_name); zval const_TOSTRING_USE_INNER_value; ZVAL_LONG(&const_TOSTRING_USE_INNER_value, CIT_TOSTRING_USE_INNER); zend_string *const_TOSTRING_USE_INNER_name = zend_string_init_interned("TOSTRING_USE_INNER", sizeof("TOSTRING_USE_INNER") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_TOSTRING_USE_INNER_name, &const_TOSTRING_USE_INNER_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_TOSTRING_USE_INNER_name, &const_TOSTRING_USE_INNER_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_TOSTRING_USE_INNER_name); zval const_FULL_CACHE_value; ZVAL_LONG(&const_FULL_CACHE_value, CIT_FULL_CACHE); zend_string *const_FULL_CACHE_name = zend_string_init_interned("FULL_CACHE", sizeof("FULL_CACHE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FULL_CACHE_name, &const_FULL_CACHE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FULL_CACHE_name, &const_FULL_CACHE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FULL_CACHE_name); return class_entry; @@ -873,43 +873,43 @@ static zend_class_entry *register_class_RegexIterator(zend_class_entry *class_en zval const_USE_KEY_value; ZVAL_LONG(&const_USE_KEY_value, REGIT_USE_KEY); zend_string *const_USE_KEY_name = zend_string_init_interned("USE_KEY", sizeof("USE_KEY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_USE_KEY_name, &const_USE_KEY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_USE_KEY_name, &const_USE_KEY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_USE_KEY_name); zval const_INVERT_MATCH_value; ZVAL_LONG(&const_INVERT_MATCH_value, REGIT_INVERTED); zend_string *const_INVERT_MATCH_name = zend_string_init_interned("INVERT_MATCH", sizeof("INVERT_MATCH") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_INVERT_MATCH_name, &const_INVERT_MATCH_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_INVERT_MATCH_name, &const_INVERT_MATCH_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_INVERT_MATCH_name); zval const_MATCH_value; ZVAL_LONG(&const_MATCH_value, REGIT_MODE_MATCH); zend_string *const_MATCH_name = zend_string_init_interned("MATCH", sizeof("MATCH") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_MATCH_name, &const_MATCH_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_MATCH_name, &const_MATCH_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_MATCH_name); zval const_GET_MATCH_value; ZVAL_LONG(&const_GET_MATCH_value, REGIT_MODE_GET_MATCH); zend_string *const_GET_MATCH_name = zend_string_init_interned("GET_MATCH", sizeof("GET_MATCH") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_GET_MATCH_name, &const_GET_MATCH_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_GET_MATCH_name, &const_GET_MATCH_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_GET_MATCH_name); zval const_ALL_MATCHES_value; ZVAL_LONG(&const_ALL_MATCHES_value, REGIT_MODE_ALL_MATCHES); zend_string *const_ALL_MATCHES_name = zend_string_init_interned("ALL_MATCHES", sizeof("ALL_MATCHES") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ALL_MATCHES_name, &const_ALL_MATCHES_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ALL_MATCHES_name, &const_ALL_MATCHES_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ALL_MATCHES_name); zval const_SPLIT_value; ZVAL_LONG(&const_SPLIT_value, REGIT_MODE_SPLIT); zend_string *const_SPLIT_name = zend_string_init_interned("SPLIT", sizeof("SPLIT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_SPLIT_name, &const_SPLIT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_SPLIT_name, &const_SPLIT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_SPLIT_name); zval const_REPLACE_value; ZVAL_LONG(&const_REPLACE_value, REGIT_MODE_REPLACE); zend_string *const_REPLACE_name = zend_string_init_interned("REPLACE", sizeof("REPLACE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_REPLACE_name, &const_REPLACE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_REPLACE_name, &const_REPLACE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_REPLACE_name); zval property_replacement_default_value; @@ -942,49 +942,49 @@ static zend_class_entry *register_class_RecursiveTreeIterator(zend_class_entry * zval const_BYPASS_CURRENT_value; ZVAL_LONG(&const_BYPASS_CURRENT_value, RTIT_BYPASS_CURRENT); zend_string *const_BYPASS_CURRENT_name = zend_string_init_interned("BYPASS_CURRENT", sizeof("BYPASS_CURRENT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_BYPASS_CURRENT_name, &const_BYPASS_CURRENT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_BYPASS_CURRENT_name, &const_BYPASS_CURRENT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_BYPASS_CURRENT_name); zval const_BYPASS_KEY_value; ZVAL_LONG(&const_BYPASS_KEY_value, RTIT_BYPASS_KEY); zend_string *const_BYPASS_KEY_name = zend_string_init_interned("BYPASS_KEY", sizeof("BYPASS_KEY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_BYPASS_KEY_name, &const_BYPASS_KEY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_BYPASS_KEY_name, &const_BYPASS_KEY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_BYPASS_KEY_name); zval const_PREFIX_LEFT_value; ZVAL_LONG(&const_PREFIX_LEFT_value, 0); zend_string *const_PREFIX_LEFT_name = zend_string_init_interned("PREFIX_LEFT", sizeof("PREFIX_LEFT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_PREFIX_LEFT_name, &const_PREFIX_LEFT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_PREFIX_LEFT_name, &const_PREFIX_LEFT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_PREFIX_LEFT_name); zval const_PREFIX_MID_HAS_NEXT_value; ZVAL_LONG(&const_PREFIX_MID_HAS_NEXT_value, 1); zend_string *const_PREFIX_MID_HAS_NEXT_name = zend_string_init_interned("PREFIX_MID_HAS_NEXT", sizeof("PREFIX_MID_HAS_NEXT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_PREFIX_MID_HAS_NEXT_name, &const_PREFIX_MID_HAS_NEXT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_PREFIX_MID_HAS_NEXT_name, &const_PREFIX_MID_HAS_NEXT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_PREFIX_MID_HAS_NEXT_name); zval const_PREFIX_MID_LAST_value; ZVAL_LONG(&const_PREFIX_MID_LAST_value, 2); zend_string *const_PREFIX_MID_LAST_name = zend_string_init_interned("PREFIX_MID_LAST", sizeof("PREFIX_MID_LAST") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_PREFIX_MID_LAST_name, &const_PREFIX_MID_LAST_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_PREFIX_MID_LAST_name, &const_PREFIX_MID_LAST_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_PREFIX_MID_LAST_name); zval const_PREFIX_END_HAS_NEXT_value; ZVAL_LONG(&const_PREFIX_END_HAS_NEXT_value, 3); zend_string *const_PREFIX_END_HAS_NEXT_name = zend_string_init_interned("PREFIX_END_HAS_NEXT", sizeof("PREFIX_END_HAS_NEXT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_PREFIX_END_HAS_NEXT_name, &const_PREFIX_END_HAS_NEXT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_PREFIX_END_HAS_NEXT_name, &const_PREFIX_END_HAS_NEXT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_PREFIX_END_HAS_NEXT_name); zval const_PREFIX_END_LAST_value; ZVAL_LONG(&const_PREFIX_END_LAST_value, 4); zend_string *const_PREFIX_END_LAST_name = zend_string_init_interned("PREFIX_END_LAST", sizeof("PREFIX_END_LAST") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_PREFIX_END_LAST_name, &const_PREFIX_END_LAST_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_PREFIX_END_LAST_name, &const_PREFIX_END_LAST_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_PREFIX_END_LAST_name); zval const_PREFIX_RIGHT_value; ZVAL_LONG(&const_PREFIX_RIGHT_value, 5); zend_string *const_PREFIX_RIGHT_name = zend_string_init_interned("PREFIX_RIGHT", sizeof("PREFIX_RIGHT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_PREFIX_RIGHT_name, &const_PREFIX_RIGHT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_PREFIX_RIGHT_name, &const_PREFIX_RIGHT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_PREFIX_RIGHT_name); return class_entry; diff --git a/ext/spl/spl_observer.stub.php b/ext/spl/spl_observer.stub.php index 696ef38fb7e3f..41659d7dc6f79 100644 --- a/ext/spl/spl_observer.stub.php +++ b/ext/spl/spl_observer.stub.php @@ -116,25 +116,21 @@ public function __debugInfo(): array {} class MultipleIterator implements Iterator { /** - * @var int * @cvalue MIT_NEED_ANY */ - public const MIT_NEED_ANY = UNKNOWN; + public const int MIT_NEED_ANY = UNKNOWN; /** - * @var int * @cvalue MIT_NEED_ALL */ - public const MIT_NEED_ALL = UNKNOWN; + public const int MIT_NEED_ALL = UNKNOWN; /** - * @var int * @cvalue MIT_KEYS_NUMERIC */ - public const MIT_KEYS_NUMERIC = UNKNOWN; + public const int MIT_KEYS_NUMERIC = UNKNOWN; /** - * @var int * @cvalue MIT_KEYS_ASSOC */ - public const MIT_KEYS_ASSOC = UNKNOWN; + public const int MIT_KEYS_ASSOC = UNKNOWN; public function __construct(int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC) {} diff --git a/ext/spl/spl_observer_arginfo.h b/ext/spl/spl_observer_arginfo.h index 342c803db8389..fd8fc3a7eedc7 100644 --- a/ext/spl/spl_observer_arginfo.h +++ b/ext/spl/spl_observer_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e2d66473e8e2436652b78abd9c237e1a50c3d0dc */ + * Stub hash: 74cd0360e3f306b76eec0abacef6f9a4d6ff795a */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplObserver_update, 0, 1, IS_VOID, 0) ZEND_ARG_OBJ_INFO(0, subject, SplSubject, 0) @@ -271,25 +271,25 @@ static zend_class_entry *register_class_MultipleIterator(zend_class_entry *class zval const_MIT_NEED_ANY_value; ZVAL_LONG(&const_MIT_NEED_ANY_value, MIT_NEED_ANY); zend_string *const_MIT_NEED_ANY_name = zend_string_init_interned("MIT_NEED_ANY", sizeof("MIT_NEED_ANY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_MIT_NEED_ANY_name, &const_MIT_NEED_ANY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_MIT_NEED_ANY_name, &const_MIT_NEED_ANY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_MIT_NEED_ANY_name); zval const_MIT_NEED_ALL_value; ZVAL_LONG(&const_MIT_NEED_ALL_value, MIT_NEED_ALL); zend_string *const_MIT_NEED_ALL_name = zend_string_init_interned("MIT_NEED_ALL", sizeof("MIT_NEED_ALL") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_MIT_NEED_ALL_name, &const_MIT_NEED_ALL_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_MIT_NEED_ALL_name, &const_MIT_NEED_ALL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_MIT_NEED_ALL_name); zval const_MIT_KEYS_NUMERIC_value; ZVAL_LONG(&const_MIT_KEYS_NUMERIC_value, MIT_KEYS_NUMERIC); zend_string *const_MIT_KEYS_NUMERIC_name = zend_string_init_interned("MIT_KEYS_NUMERIC", sizeof("MIT_KEYS_NUMERIC") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_MIT_KEYS_NUMERIC_name, &const_MIT_KEYS_NUMERIC_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_MIT_KEYS_NUMERIC_name, &const_MIT_KEYS_NUMERIC_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_MIT_KEYS_NUMERIC_name); zval const_MIT_KEYS_ASSOC_value; ZVAL_LONG(&const_MIT_KEYS_ASSOC_value, MIT_KEYS_ASSOC); zend_string *const_MIT_KEYS_ASSOC_name = zend_string_init_interned("MIT_KEYS_ASSOC", sizeof("MIT_KEYS_ASSOC") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_MIT_KEYS_ASSOC_name, &const_MIT_KEYS_ASSOC_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_MIT_KEYS_ASSOC_name, &const_MIT_KEYS_ASSOC_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_MIT_KEYS_ASSOC_name); return class_entry; From 391d0f2c39671b10837dcae9864da17214407b64 Mon Sep 17 00:00:00 2001 From: Jorg Adam Sowa Date: Fri, 6 Oct 2023 23:56:42 +0200 Subject: [PATCH 2/3] Added note about typed class constants in Spl extension --- UPGRADING | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UPGRADING b/UPGRADING index d8327ed933488..52dab2022df0b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -100,6 +100,9 @@ PHP 8.4 UPGRADE NOTES 9. Other Changes to Extensions ======================================== +- Spl: + . The class constants are typed now. + ======================================== 10. New Global Constants ======================================== From 4a55b2190d17d2f6cafeae758de3346d2fd68205 Mon Sep 17 00:00:00 2001 From: Jorg Adam Sowa Date: Fri, 6 Oct 2023 23:59:30 +0200 Subject: [PATCH 3/3] Inline phpdoc for class constants --- ext/spl/spl_array.stub.php | 20 +++------ ext/spl/spl_array_arginfo.h | 2 +- ext/spl/spl_directory.stub.php | 64 +++++++-------------------- ext/spl/spl_directory_arginfo.h | 2 +- ext/spl/spl_dllist.stub.php | 16 ++----- ext/spl/spl_dllist_arginfo.h | 2 +- ext/spl/spl_heap.stub.php | 12 ++---- ext/spl/spl_heap_arginfo.h | 2 +- ext/spl/spl_iterators.stub.php | 76 +++++++++------------------------ ext/spl/spl_iterators_arginfo.h | 2 +- ext/spl/spl_observer.stub.php | 16 ++----- ext/spl/spl_observer_arginfo.h | 2 +- 12 files changed, 57 insertions(+), 159 deletions(-) diff --git a/ext/spl/spl_array.stub.php b/ext/spl/spl_array.stub.php index f22fd8b68e0fe..1f4c81057dcbc 100644 --- a/ext/spl/spl_array.stub.php +++ b/ext/spl/spl_array.stub.php @@ -4,13 +4,9 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable { - /** - * @cvalue SPL_ARRAY_STD_PROP_LIST - */ + /** @cvalue SPL_ARRAY_STD_PROP_LIST */ public const int STD_PROP_LIST = UNKNOWN; - /** - * @cvalue SPL_ARRAY_ARRAY_AS_PROPS - */ + /** @cvalue SPL_ARRAY_ARRAY_AS_PROPS */ public const int ARRAY_AS_PROPS = UNKNOWN; public function __construct(array|object $array = [], int $flags = 0, string $iteratorClass = ArrayIterator::class) {} @@ -90,13 +86,9 @@ public function __debugInfo(): array {} class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Countable { - /** - * @cvalue SPL_ARRAY_STD_PROP_LIST - */ + /** @cvalue SPL_ARRAY_STD_PROP_LIST */ public const int STD_PROP_LIST = UNKNOWN; - /** - * @cvalue SPL_ARRAY_ARRAY_AS_PROPS - */ + /** @cvalue SPL_ARRAY_ARRAY_AS_PROPS */ public const int ARRAY_AS_PROPS = UNKNOWN; public function __construct(array|object $array = [], int $flags = 0) {} @@ -242,9 +234,7 @@ public function __debugInfo(): array {} class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator { - /** - * @cvalue SPL_ARRAY_CHILD_ARRAYS_ONLY - */ + /** @cvalue SPL_ARRAY_CHILD_ARRAYS_ONLY */ public const int CHILD_ARRAYS_ONLY = UNKNOWN; /** @tentative-return-type */ diff --git a/ext/spl/spl_array_arginfo.h b/ext/spl/spl_array_arginfo.h index 1ec6511ba3050..a71620e1b3ecd 100644 --- a/ext/spl/spl_array_arginfo.h +++ b/ext/spl/spl_array_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 760b6a074aeaa14a1e560081e5e9f70f462274b2 */ + * Stub hash: c52e89992bd3c04877daab47f4328af0b6ce619e */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject___construct, 0, 0, 0) ZEND_ARG_TYPE_MASK(0, array, MAY_BE_ARRAY|MAY_BE_OBJECT, "[]") diff --git a/ext/spl/spl_directory.stub.php b/ext/spl/spl_directory.stub.php index 4ceaa74748373..1e858534c5f4b 100644 --- a/ext/spl/spl_directory.stub.php +++ b/ext/spl/spl_directory.stub.php @@ -150,53 +150,29 @@ public function __toString(): string {} class FilesystemIterator extends DirectoryIterator { - /** - * @cvalue SPL_FILE_DIR_CURRENT_MODE_MASK - */ + /** @cvalue SPL_FILE_DIR_CURRENT_MODE_MASK */ public const int CURRENT_MODE_MASK = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_CURRENT_AS_PATHNAME - */ + /** @cvalue SPL_FILE_DIR_CURRENT_AS_PATHNAME */ public const int CURRENT_AS_PATHNAME = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_CURRENT_AS_FILEINFO - */ + /** @cvalue SPL_FILE_DIR_CURRENT_AS_FILEINFO */ public const int CURRENT_AS_FILEINFO = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_CURRENT_AS_SELF - */ + /** @cvalue SPL_FILE_DIR_CURRENT_AS_SELF */ public const int CURRENT_AS_SELF = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_KEY_MODE_MASK - */ + /** @cvalue SPL_FILE_DIR_KEY_MODE_MASK */ public const int KEY_MODE_MASK = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_KEY_AS_PATHNAME - */ + /** @cvalue SPL_FILE_DIR_KEY_AS_PATHNAME */ public const int KEY_AS_PATHNAME = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_FOLLOW_SYMLINKS - */ + /** @cvalue SPL_FILE_DIR_FOLLOW_SYMLINKS */ public const int FOLLOW_SYMLINKS = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_KEY_AS_FILENAME - */ + /** @cvalue SPL_FILE_DIR_KEY_AS_FILENAME */ public const int KEY_AS_FILENAME = UNKNOWN; - /** - * @cvalue SPL_FILE_NEW_CURRENT_AND_KEY - */ + /** @cvalue SPL_FILE_NEW_CURRENT_AND_KEY */ public const int NEW_CURRENT_AND_KEY = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_OTHERS_MASK - */ + /** @cvalue SPL_FILE_DIR_OTHERS_MASK */ public const int OTHER_MODE_MASK = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_SKIPDOTS - */ + /** @cvalue SPL_FILE_DIR_SKIPDOTS */ public const int SKIP_DOTS = UNKNOWN; - /** - * @cvalue SPL_FILE_DIR_UNIXPATHS - */ + /** @cvalue SPL_FILE_DIR_UNIXPATHS */ public const int UNIX_PATHS = UNKNOWN; public function __construct(string $directory, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS) {} @@ -246,21 +222,13 @@ public function count(): int {} class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIterator { - /** - * @cvalue SPL_FILE_OBJECT_DROP_NEW_LINE - */ + /** @cvalue SPL_FILE_OBJECT_DROP_NEW_LINE */ public const int DROP_NEW_LINE = UNKNOWN; - /** - * @cvalue SPL_FILE_OBJECT_READ_AHEAD - */ + /** @cvalue SPL_FILE_OBJECT_READ_AHEAD */ public const int READ_AHEAD = UNKNOWN; - /** - * @cvalue SPL_FILE_OBJECT_SKIP_EMPTY - */ + /** @cvalue SPL_FILE_OBJECT_SKIP_EMPTY */ public const int SKIP_EMPTY = UNKNOWN; - /** - * @cvalue SPL_FILE_OBJECT_READ_CSV - */ + /** @cvalue SPL_FILE_OBJECT_READ_CSV */ public const int READ_CSV = UNKNOWN; /** @param resource|null $context */ diff --git a/ext/spl/spl_directory_arginfo.h b/ext/spl/spl_directory_arginfo.h index 9e6816e0eff60..a059425a12400 100644 --- a/ext/spl/spl_directory_arginfo.h +++ b/ext/spl/spl_directory_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: fb9baab6b43b84bdcda6b2ed4b4d393cda26baa8 */ + * Stub hash: 6212994df4935f42c99080b928b8b5b08bdbe19d */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileInfo___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) diff --git a/ext/spl/spl_dllist.stub.php b/ext/spl/spl_dllist.stub.php index 62039ea60ffa1..4257612c4b6f4 100644 --- a/ext/spl/spl_dllist.stub.php +++ b/ext/spl/spl_dllist.stub.php @@ -4,21 +4,13 @@ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializable { - /** - * @cvalue SPL_DLLIST_IT_LIFO - */ + /** @cvalue SPL_DLLIST_IT_LIFO */ public const int IT_MODE_LIFO = UNKNOWN; - /** - * @cvalue SPL_DLLIST_IT_FIFO - */ + /** @cvalue SPL_DLLIST_IT_FIFO */ public const int IT_MODE_FIFO = UNKNOWN; - /** - * @cvalue SPL_DLLIST_IT_DELETE - */ + /** @cvalue SPL_DLLIST_IT_DELETE */ public const int IT_MODE_DELETE = UNKNOWN; - /** - * @cvalue SPL_DLLIST_IT_KEEP - */ + /** @cvalue SPL_DLLIST_IT_KEEP */ public const int IT_MODE_KEEP = UNKNOWN; /** @tentative-return-type */ diff --git a/ext/spl/spl_dllist_arginfo.h b/ext/spl/spl_dllist_arginfo.h index 3ef8355ef2e63..c2892c39783f9 100644 --- a/ext/spl/spl_dllist_arginfo.h +++ b/ext/spl/spl_dllist_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 9969bd9f785db905720950ae349b903ec80d1f75 */ + * Stub hash: 45e42d3a0589031651daee5653900d5a4fb61c3d */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplDoublyLinkedList_add, 0, 2, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) diff --git a/ext/spl/spl_heap.stub.php b/ext/spl/spl_heap.stub.php index 3dbf8928a05f1..9a6ae7bf78fb8 100644 --- a/ext/spl/spl_heap.stub.php +++ b/ext/spl/spl_heap.stub.php @@ -4,17 +4,11 @@ class SplPriorityQueue implements Iterator, Countable { - /** - * @cvalue SPL_PQUEUE_EXTR_BOTH - */ + /** @cvalue SPL_PQUEUE_EXTR_BOTH */ public const int EXTR_BOTH = UNKNOWN; - /** - * @cvalue SPL_PQUEUE_EXTR_PRIORITY - */ + /** @cvalue SPL_PQUEUE_EXTR_PRIORITY */ public const int EXTR_PRIORITY = UNKNOWN; - /** - * @cvalue SPL_PQUEUE_EXTR_DATA - */ + /** @cvalue SPL_PQUEUE_EXTR_DATA */ public const int EXTR_DATA = UNKNOWN; /** @tentative-return-type */ diff --git a/ext/spl/spl_heap_arginfo.h b/ext/spl/spl_heap_arginfo.h index c4a10e0936d37..3f1557f704db8 100644 --- a/ext/spl/spl_heap_arginfo.h +++ b/ext/spl/spl_heap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 92e2832ff549af1b36bd8747a89db2fef3778083 */ + * Stub hash: 627bf1f09cfb444f90e0dba6d2b7341312d723cf */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplPriorityQueue_compare, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, priority1, IS_MIXED, 0) diff --git a/ext/spl/spl_iterators.stub.php b/ext/spl/spl_iterators.stub.php index 34f104110e13b..6803fec1e70a2 100644 --- a/ext/spl/spl_iterators.stub.php +++ b/ext/spl/spl_iterators.stub.php @@ -53,21 +53,13 @@ public function getChildren(): ?RecursiveIterator; class RecursiveIteratorIterator implements OuterIterator { - /** - * @cvalue RIT_LEAVES_ONLY - */ + /** @cvalue RIT_LEAVES_ONLY */ public const int LEAVES_ONLY = UNKNOWN; - /** - * @cvalue RIT_SELF_FIRST - */ + /** @cvalue RIT_SELF_FIRST */ public const int SELF_FIRST = UNKNOWN; - /** - * @cvalue RIT_CHILD_FIRST - */ + /** @cvalue RIT_CHILD_FIRST */ public const int CHILD_FIRST = UNKNOWN; - /** - * @cvalue RIT_CATCH_GET_CHILD - */ + /** @cvalue RIT_CATCH_GET_CHILD */ public const int CATCH_GET_CHILD = UNKNOWN; public function __construct(Traversable $iterator, int $mode = RecursiveIteratorIterator::LEAVES_ONLY, int $flags = 0) {} @@ -217,29 +209,17 @@ public function getPosition(): int {} class CachingIterator extends IteratorIterator implements ArrayAccess, Countable, Stringable { - /** - * @cvalue CIT_CALL_TOSTRING - */ + /** @cvalue CIT_CALL_TOSTRING */ public const int CALL_TOSTRING = UNKNOWN; - /** - * @cvalue CIT_CATCH_GET_CHILD - */ + /** @cvalue CIT_CATCH_GET_CHILD */ public const int CATCH_GET_CHILD = UNKNOWN; - /** - * @cvalue CIT_TOSTRING_USE_KEY - */ + /** @cvalue CIT_TOSTRING_USE_KEY */ public const int TOSTRING_USE_KEY = UNKNOWN; - /** - * @cvalue CIT_TOSTRING_USE_CURRENT - */ + /** @cvalue CIT_TOSTRING_USE_CURRENT */ public const int TOSTRING_USE_CURRENT = UNKNOWN; - /** - * @cvalue CIT_TOSTRING_USE_INNER - */ + /** @cvalue CIT_TOSTRING_USE_INNER */ public const int TOSTRING_USE_INNER = UNKNOWN; - /** - * @cvalue CIT_FULL_CACHE - */ + /** @cvalue CIT_FULL_CACHE */ public const int FULL_CACHE = UNKNOWN; public function __construct(Iterator $iterator, int $flags = CachingIterator::CALL_TOSTRING) {} @@ -362,33 +342,19 @@ public function next(): void {} class RegexIterator extends FilterIterator { - /** - * @cvalue REGIT_USE_KEY - */ + /** @cvalue REGIT_USE_KEY */ public const int USE_KEY = UNKNOWN; - /** - * @cvalue REGIT_INVERTED - */ + /** @cvalue REGIT_INVERTED */ public const int INVERT_MATCH = UNKNOWN; - /** - * @cvalue REGIT_MODE_MATCH - */ + /** @cvalue REGIT_MODE_MATCH */ public const int MATCH = UNKNOWN; - /** - * @cvalue REGIT_MODE_GET_MATCH - */ + /** @cvalue REGIT_MODE_GET_MATCH */ public const int GET_MATCH = UNKNOWN; - /** - * @cvalue REGIT_MODE_ALL_MATCHES - */ + /** @cvalue REGIT_MODE_ALL_MATCHES */ public const int ALL_MATCHES = UNKNOWN; - /** - * @cvalue REGIT_MODE_SPLIT - */ + /** @cvalue REGIT_MODE_SPLIT */ public const int SPLIT = UNKNOWN; - /** - * @cvalue REGIT_MODE_REPLACE - */ + /** @cvalue REGIT_MODE_REPLACE */ public const int REPLACE = UNKNOWN; public ?string $replacement = null; @@ -439,13 +405,9 @@ public function getChildren(): RecursiveRegexIterator {} class RecursiveTreeIterator extends RecursiveIteratorIterator { - /** - * @cvalue RTIT_BYPASS_CURRENT - */ + /** @cvalue RTIT_BYPASS_CURRENT */ public const int BYPASS_CURRENT = UNKNOWN; - /** - * @cvalue RTIT_BYPASS_KEY - */ + /** @cvalue RTIT_BYPASS_KEY */ public const int BYPASS_KEY = UNKNOWN; public const int PREFIX_LEFT = 0; diff --git a/ext/spl/spl_iterators_arginfo.h b/ext/spl/spl_iterators_arginfo.h index 4c9cac4cf43f3..31d25a8405c78 100644 --- a/ext/spl/spl_iterators_arginfo.h +++ b/ext/spl/spl_iterators_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 1fc04f2fd79b5657fc56f1a0bc44978fdba04406 */ + * Stub hash: 68008c87b5dd1895761f51bff8f63df4b517a54b */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_EmptyIterator_current, 0, 0, IS_NEVER, 0) ZEND_END_ARG_INFO() diff --git a/ext/spl/spl_observer.stub.php b/ext/spl/spl_observer.stub.php index 41659d7dc6f79..4fa2b08d64f7a 100644 --- a/ext/spl/spl_observer.stub.php +++ b/ext/spl/spl_observer.stub.php @@ -115,21 +115,13 @@ public function __debugInfo(): array {} class MultipleIterator implements Iterator { - /** - * @cvalue MIT_NEED_ANY - */ + /** @cvalue MIT_NEED_ANY */ public const int MIT_NEED_ANY = UNKNOWN; - /** - * @cvalue MIT_NEED_ALL - */ + /** @cvalue MIT_NEED_ALL */ public const int MIT_NEED_ALL = UNKNOWN; - /** - * @cvalue MIT_KEYS_NUMERIC - */ + /** @cvalue MIT_KEYS_NUMERIC */ public const int MIT_KEYS_NUMERIC = UNKNOWN; - /** - * @cvalue MIT_KEYS_ASSOC - */ + /** @cvalue MIT_KEYS_ASSOC */ public const int MIT_KEYS_ASSOC = UNKNOWN; public function __construct(int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC) {} diff --git a/ext/spl/spl_observer_arginfo.h b/ext/spl/spl_observer_arginfo.h index fd8fc3a7eedc7..8a3902c62a07b 100644 --- a/ext/spl/spl_observer_arginfo.h +++ b/ext/spl/spl_observer_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 74cd0360e3f306b76eec0abacef6f9a4d6ff795a */ + * Stub hash: 3e17e99dffb3150685ae7c4724d6b8aad2f5db6e */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplObserver_update, 0, 1, IS_VOID, 0) ZEND_ARG_OBJ_INFO(0, subject, SplSubject, 0)