diff --git a/UPGRADING b/UPGRADING index 04217a0bde816..6300cfbdf1734 100644 --- a/UPGRADING +++ b/UPGRADING @@ -106,6 +106,9 @@ PHP 8.4 UPGRADE NOTES 9. Other Changes to Extensions ======================================== +- Spl: + . The class constants are typed now. + ======================================== 10. New Global Constants ======================================== diff --git a/ext/spl/spl_array.stub.php b/ext/spl/spl_array.stub.php index 8841fb351aefa..1f4c81057dcbc 100644 --- a/ext/spl/spl_array.stub.php +++ b/ext/spl/spl_array.stub.php @@ -4,16 +4,10 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable { - /** - * @var int - * @cvalue SPL_ARRAY_STD_PROP_LIST - */ - const STD_PROP_LIST = UNKNOWN; - /** - * @var int - * @cvalue SPL_ARRAY_ARRAY_AS_PROPS - */ - const ARRAY_AS_PROPS = UNKNOWN; + /** @cvalue SPL_ARRAY_STD_PROP_LIST */ + public const int STD_PROP_LIST = UNKNOWN; + /** @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) {} @@ -92,16 +86,10 @@ 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; - /** - * @var int - * @cvalue SPL_ARRAY_ARRAY_AS_PROPS - */ - public const ARRAY_AS_PROPS = UNKNOWN; + /** @cvalue SPL_ARRAY_STD_PROP_LIST */ + public const int STD_PROP_LIST = UNKNOWN; + /** @cvalue SPL_ARRAY_ARRAY_AS_PROPS */ + public const int ARRAY_AS_PROPS = UNKNOWN; public function __construct(array|object $array = [], int $flags = 0) {} @@ -246,11 +234,8 @@ public function __debugInfo(): array {} class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator { - /** - * @var int - * @cvalue SPL_ARRAY_CHILD_ARRAYS_ONLY - */ - public const CHILD_ARRAYS_ONLY = UNKNOWN; + /** @cvalue SPL_ARRAY_CHILD_ARRAYS_ONLY */ + 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..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: d0ce4612e25d2b8a765544c835fa2347ae9b23f2 */ + * 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, "[]") @@ -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..1e858534c5f4b 100644 --- a/ext/spl/spl_directory.stub.php +++ b/ext/spl/spl_directory.stub.php @@ -150,66 +150,30 @@ public function __toString(): string {} class FilesystemIterator extends DirectoryIterator { - /** - * @var int - * @cvalue SPL_FILE_DIR_CURRENT_MODE_MASK - */ - public const CURRENT_MODE_MASK = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_CURRENT_AS_PATHNAME - */ - public const CURRENT_AS_PATHNAME = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_CURRENT_AS_FILEINFO - */ - public const CURRENT_AS_FILEINFO = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_CURRENT_AS_SELF - */ - public const CURRENT_AS_SELF = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_KEY_MODE_MASK - */ - public const KEY_MODE_MASK = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_KEY_AS_PATHNAME - */ - public const KEY_AS_PATHNAME = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_FOLLOW_SYMLINKS - */ - public const FOLLOW_SYMLINKS = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_KEY_AS_FILENAME - */ - public const KEY_AS_FILENAME = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_NEW_CURRENT_AND_KEY - */ - public const NEW_CURRENT_AND_KEY = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_OTHERS_MASK - */ - public const OTHER_MODE_MASK = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_SKIPDOTS - */ - public const SKIP_DOTS = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_DIR_UNIXPATHS - */ - public const UNIX_PATHS = UNKNOWN; + /** @cvalue SPL_FILE_DIR_CURRENT_MODE_MASK */ + public const int CURRENT_MODE_MASK = UNKNOWN; + /** @cvalue SPL_FILE_DIR_CURRENT_AS_PATHNAME */ + public const int CURRENT_AS_PATHNAME = UNKNOWN; + /** @cvalue SPL_FILE_DIR_CURRENT_AS_FILEINFO */ + public const int CURRENT_AS_FILEINFO = UNKNOWN; + /** @cvalue SPL_FILE_DIR_CURRENT_AS_SELF */ + public const int CURRENT_AS_SELF = UNKNOWN; + /** @cvalue SPL_FILE_DIR_KEY_MODE_MASK */ + public const int KEY_MODE_MASK = UNKNOWN; + /** @cvalue SPL_FILE_DIR_KEY_AS_PATHNAME */ + public const int KEY_AS_PATHNAME = UNKNOWN; + /** @cvalue SPL_FILE_DIR_FOLLOW_SYMLINKS */ + public const int FOLLOW_SYMLINKS = UNKNOWN; + /** @cvalue SPL_FILE_DIR_KEY_AS_FILENAME */ + public const int KEY_AS_FILENAME = UNKNOWN; + /** @cvalue SPL_FILE_NEW_CURRENT_AND_KEY */ + public const int NEW_CURRENT_AND_KEY = UNKNOWN; + /** @cvalue SPL_FILE_DIR_OTHERS_MASK */ + public const int OTHER_MODE_MASK = UNKNOWN; + /** @cvalue SPL_FILE_DIR_SKIPDOTS */ + public const int SKIP_DOTS = UNKNOWN; + /** @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) {} @@ -258,26 +222,14 @@ 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; - /** - * @var int - * @cvalue SPL_FILE_OBJECT_READ_AHEAD - */ - public const READ_AHEAD = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_OBJECT_SKIP_EMPTY - */ - public const SKIP_EMPTY = UNKNOWN; - /** - * @var int - * @cvalue SPL_FILE_OBJECT_READ_CSV - */ - public const READ_CSV = UNKNOWN; + /** @cvalue SPL_FILE_OBJECT_DROP_NEW_LINE */ + public const int DROP_NEW_LINE = UNKNOWN; + /** @cvalue SPL_FILE_OBJECT_READ_AHEAD */ + public const int READ_AHEAD = UNKNOWN; + /** @cvalue SPL_FILE_OBJECT_SKIP_EMPTY */ + public const int SKIP_EMPTY = UNKNOWN; + /** @cvalue SPL_FILE_OBJECT_READ_CSV */ + 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..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: 7e67d07b6079c39a091e91dfddfbe7170067955e */ + * Stub hash: 6212994df4935f42c99080b928b8b5b08bdbe19d */ 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..4257612c4b6f4 100644 --- a/ext/spl/spl_dllist.stub.php +++ b/ext/spl/spl_dllist.stub.php @@ -4,26 +4,14 @@ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializable { - /** - * @var int - * @cvalue SPL_DLLIST_IT_LIFO - */ - public const IT_MODE_LIFO = UNKNOWN; - /** - * @var int - * @cvalue SPL_DLLIST_IT_FIFO - */ - public const IT_MODE_FIFO = UNKNOWN; - /** - * @var int - * @cvalue SPL_DLLIST_IT_DELETE - */ - public const IT_MODE_DELETE = UNKNOWN; - /** - * @var int - * @cvalue SPL_DLLIST_IT_KEEP - */ - public const IT_MODE_KEEP = UNKNOWN; + /** @cvalue SPL_DLLIST_IT_LIFO */ + public const int IT_MODE_LIFO = UNKNOWN; + /** @cvalue SPL_DLLIST_IT_FIFO */ + public const int IT_MODE_FIFO = UNKNOWN; + /** @cvalue SPL_DLLIST_IT_DELETE */ + public const int IT_MODE_DELETE = UNKNOWN; + /** @cvalue SPL_DLLIST_IT_KEEP */ + 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..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: b88d228873f2d8e0caa583fd80c70ce2bfc51188 */ + * 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) @@ -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..9a6ae7bf78fb8 100644 --- a/ext/spl/spl_heap.stub.php +++ b/ext/spl/spl_heap.stub.php @@ -4,21 +4,12 @@ class SplPriorityQueue implements Iterator, Countable { - /** - * @var int - * @cvalue SPL_PQUEUE_EXTR_BOTH - */ - public const EXTR_BOTH = UNKNOWN; - /** - * @var int - * @cvalue SPL_PQUEUE_EXTR_PRIORITY - */ - public const EXTR_PRIORITY = UNKNOWN; - /** - * @var int - * @cvalue SPL_PQUEUE_EXTR_DATA - */ - public const EXTR_DATA = UNKNOWN; + /** @cvalue SPL_PQUEUE_EXTR_BOTH */ + public const int EXTR_BOTH = UNKNOWN; + /** @cvalue SPL_PQUEUE_EXTR_PRIORITY */ + public const int EXTR_PRIORITY = UNKNOWN; + /** @cvalue SPL_PQUEUE_EXTR_DATA */ + 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..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: 4045035ec5bee0f951fa31df75c3f42c31bd8be2 */ + * 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) @@ -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..6803fec1e70a2 100644 --- a/ext/spl/spl_iterators.stub.php +++ b/ext/spl/spl_iterators.stub.php @@ -53,26 +53,14 @@ public function getChildren(): ?RecursiveIterator; class RecursiveIteratorIterator implements OuterIterator { - /** - * @var int - * @cvalue RIT_LEAVES_ONLY - */ - public const LEAVES_ONLY = UNKNOWN; - /** - * @var int - * @cvalue RIT_SELF_FIRST - */ - public const SELF_FIRST = UNKNOWN; - /** - * @var int - * @cvalue RIT_CHILD_FIRST - */ - public const CHILD_FIRST = UNKNOWN; - /** - * @var int - * @cvalue RIT_CATCH_GET_CHILD - */ - public const CATCH_GET_CHILD = UNKNOWN; + /** @cvalue RIT_LEAVES_ONLY */ + public const int LEAVES_ONLY = UNKNOWN; + /** @cvalue RIT_SELF_FIRST */ + public const int SELF_FIRST = UNKNOWN; + /** @cvalue RIT_CHILD_FIRST */ + public const int CHILD_FIRST = UNKNOWN; + /** @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) {} @@ -221,36 +209,18 @@ public function getPosition(): int {} class CachingIterator extends IteratorIterator implements ArrayAccess, Countable, Stringable { - /** - * @var int - * @cvalue CIT_CALL_TOSTRING - */ - public const CALL_TOSTRING = UNKNOWN; - /** - * @var int - * @cvalue CIT_CATCH_GET_CHILD - */ - public const CATCH_GET_CHILD = UNKNOWN; - /** - * @var int - * @cvalue CIT_TOSTRING_USE_KEY - */ - public const TOSTRING_USE_KEY = UNKNOWN; - /** - * @var int - * @cvalue CIT_TOSTRING_USE_CURRENT - */ - public const TOSTRING_USE_CURRENT = UNKNOWN; - /** - * @var int - * @cvalue CIT_TOSTRING_USE_INNER - */ - public const TOSTRING_USE_INNER = UNKNOWN; - /** - * @var int - * @cvalue CIT_FULL_CACHE - */ - public const FULL_CACHE = UNKNOWN; + /** @cvalue CIT_CALL_TOSTRING */ + public const int CALL_TOSTRING = UNKNOWN; + /** @cvalue CIT_CATCH_GET_CHILD */ + public const int CATCH_GET_CHILD = UNKNOWN; + /** @cvalue CIT_TOSTRING_USE_KEY */ + public const int TOSTRING_USE_KEY = UNKNOWN; + /** @cvalue CIT_TOSTRING_USE_CURRENT */ + public const int TOSTRING_USE_CURRENT = UNKNOWN; + /** @cvalue CIT_TOSTRING_USE_INNER */ + public const int TOSTRING_USE_INNER = UNKNOWN; + /** @cvalue CIT_FULL_CACHE */ + public const int FULL_CACHE = UNKNOWN; public function __construct(Iterator $iterator, int $flags = CachingIterator::CALL_TOSTRING) {} @@ -372,41 +342,20 @@ public function next(): void {} class RegexIterator extends FilterIterator { - /** - * @var int - * @cvalue REGIT_USE_KEY - */ - public const USE_KEY = UNKNOWN; - /** - * @var int - * @cvalue REGIT_INVERTED - */ - public const INVERT_MATCH = UNKNOWN; - /** - * @var int - * @cvalue REGIT_MODE_MATCH - */ - public const MATCH = UNKNOWN; - /** - * @var int - * @cvalue REGIT_MODE_GET_MATCH - */ - public const GET_MATCH = UNKNOWN; - /** - * @var int - * @cvalue REGIT_MODE_ALL_MATCHES - */ - public const ALL_MATCHES = UNKNOWN; - /** - * @var int - * @cvalue REGIT_MODE_SPLIT - */ - public const SPLIT = UNKNOWN; - /** - * @var int - * @cvalue REGIT_MODE_REPLACE - */ - public const REPLACE = UNKNOWN; + /** @cvalue REGIT_USE_KEY */ + public const int USE_KEY = UNKNOWN; + /** @cvalue REGIT_INVERTED */ + public const int INVERT_MATCH = UNKNOWN; + /** @cvalue REGIT_MODE_MATCH */ + public const int MATCH = UNKNOWN; + /** @cvalue REGIT_MODE_GET_MATCH */ + public const int GET_MATCH = UNKNOWN; + /** @cvalue REGIT_MODE_ALL_MATCHES */ + public const int ALL_MATCHES = UNKNOWN; + /** @cvalue REGIT_MODE_SPLIT */ + public const int SPLIT = UNKNOWN; + /** @cvalue REGIT_MODE_REPLACE */ + public const int REPLACE = UNKNOWN; public ?string $replacement = null; @@ -456,28 +405,22 @@ public function getChildren(): RecursiveRegexIterator {} class RecursiveTreeIterator extends RecursiveIteratorIterator { - /** - * @var int - * @cvalue RTIT_BYPASS_CURRENT - */ - public const 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; + /** @cvalue RTIT_BYPASS_CURRENT */ + public const int BYPASS_CURRENT = UNKNOWN; + /** @cvalue RTIT_BYPASS_KEY */ + 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..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: c01ba2e6ccaad6db28cc6f42d679dc753be57187 */ + * 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() @@ -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..4fa2b08d64f7a 100644 --- a/ext/spl/spl_observer.stub.php +++ b/ext/spl/spl_observer.stub.php @@ -115,26 +115,14 @@ public function __debugInfo(): array {} class MultipleIterator implements Iterator { - /** - * @var int - * @cvalue MIT_NEED_ANY - */ - public const MIT_NEED_ANY = UNKNOWN; - /** - * @var int - * @cvalue MIT_NEED_ALL - */ - public const MIT_NEED_ALL = UNKNOWN; - /** - * @var int - * @cvalue MIT_KEYS_NUMERIC - */ - public const MIT_KEYS_NUMERIC = UNKNOWN; - /** - * @var int - * @cvalue MIT_KEYS_ASSOC - */ - public const MIT_KEYS_ASSOC = UNKNOWN; + /** @cvalue MIT_NEED_ANY */ + public const int MIT_NEED_ANY = UNKNOWN; + /** @cvalue MIT_NEED_ALL */ + public const int MIT_NEED_ALL = UNKNOWN; + /** @cvalue MIT_KEYS_NUMERIC */ + public const int MIT_KEYS_NUMERIC = UNKNOWN; + /** @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 342c803db8389..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: e2d66473e8e2436652b78abd9c237e1a50c3d0dc */ + * 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) @@ -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;