diff --git a/NEWS b/NEWS index 733481639c0..29dd679a21d 100644 --- a/NEWS +++ b/NEWS @@ -54,6 +54,9 @@ PHP NEWS . bind_textdomain_codeset now throws an exception on empty domain. (David Carlier) +- Hash: + . Changed return type of hash_update() to true. (nielsdos) + - IMAP: . Moved to PECL. (Derick Rethans) diff --git a/UPGRADING b/UPGRADING index 301dd3d0887..23c18bb8b3b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -325,6 +325,10 @@ PHP 8.4 UPGRADE NOTES - Gettext: . bind_textdomain_codeset now throws an exception if the domain's argument is empty. +- Hash: + . Changed the return type of hash_update() to true. It was already the case that only + true could be returned, but the stub was not updated yet. + - Intl: . IntlDateFormatter::__construct() throws a ValueError if the locale is invalid. . NumberFormatter::__construct() throws a ValueError if the locale is invalid. diff --git a/ext/hash/hash.stub.php b/ext/hash/hash.stub.php index e6368e48719..6c45c63c462 100644 --- a/ext/hash/hash.stub.php +++ b/ext/hash/hash.stub.php @@ -29,7 +29,7 @@ function hash_hmac_file(string $algo, string $filename, #[\SensitiveParameter] s */ function hash_init(string $algo, int $flags = 0, #[\SensitiveParameter] string $key = "", array $options = []): HashContext {} -function hash_update(HashContext $context, string $data): bool {} +function hash_update(HashContext $context, string $data): true {} /** @param resource $stream */ function hash_update_stream(HashContext $context, $stream, int $length = -1): int {} diff --git a/ext/hash/hash_arginfo.h b/ext/hash/hash_arginfo.h index 8c24a4009d6..cc0050dff97 100644 --- a/ext/hash/hash_arginfo.h +++ b/ext/hash/hash_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: f4531ebc6817042a2729c3dd1502631656c29f05 */ + * Stub hash: 9c0f01839a287d394b78b0dfd37b278a59d1b366 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) @@ -36,7 +36,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_hash_init, 0, 1, HashContext, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update, 0, 2, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update, 0, 2, IS_TRUE, 0) ZEND_ARG_OBJ_INFO(0, context, HashContext, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_END_ARG_INFO()