mirror of
https://github.com/php/php-src.git
synced 2024-11-23 09:54:15 +08:00
Change return type of hash_update() to true (#13652)
It was already the case that this could only return true, update the stubs to reflect that. Closes GH-13614.
This commit is contained in:
parent
14b6c981c3
commit
a47849deaf
3
NEWS
3
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)
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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 {}
|
||||
|
4
ext/hash/hash_arginfo.h
generated
4
ext/hash/hash_arginfo.h
generated
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user