1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00

ext/intl IntlChar::enumCharNames changes the signature to void.

Close GH-10904
This commit is contained in:
David CARLIER
2023-03-21 20:40:53 +00:00
committed by David Carlier
parent dfae7f9835
commit 2da299703a
5 changed files with 9 additions and 4 deletions
+1
View File
@@ -56,6 +56,7 @@ PHP NEWS
. Updated datefmt_set_timezone/IntlDateformatter::setTimezone returns type.
(David Carlier).
. Updated IntlBreakInterator::setText return type. (David Carlier)
. Updated IntlChar::enumCharNames return type. (David Carlier)
- JSON:
. Added json_validate(). (Juan Morales)
+3
View File
@@ -87,6 +87,9 @@ PHP 8.3 UPGRADE NOTES
now returns true on success, previously null was returned.
. IntlBreakiterator::setText() now returns false on failure, previously
null was returned.
now returns true on sucess, previously null was returned.
. IntlChar::enumCharNames is now returning a boolean.
Previously it returned null on success and false on failure.
- MBString:
. mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional
+2 -1
View File
@@ -309,11 +309,12 @@ IC_METHOD(enumCharNames) {
ZEND_PARSE_PARAMETERS_END();
if (convert_cp(&start, string_start, int_start) == FAILURE || convert_cp(&limit, string_limit, int_limit) == FAILURE) {
RETURN_NULL();
RETURN_FALSE;
}
u_enumCharNames(start, limit, (UEnumCharNamesFn*)enumCharNames_callback, &context, nameChoice, &error);
INTL_CHECK_STATUS(error, NULL);
RETURN_TRUE;
}
/* }}} */
+1 -1
View File
@@ -3411,7 +3411,7 @@ class IntlChar
public static function digit(int|string $codepoint, int $base = 10): int|false|null {}
/** @tentative-return-type */
public static function enumCharNames(int|string $start, int|string $end, callable $callback, int $type = IntlChar::UNICODE_CHAR_NAME): ?bool {} // TODO return values just don't make sense
public static function enumCharNames(int|string $start, int|string $end, callable $callback, int $type = IntlChar::UNICODE_CHAR_NAME): bool {}
/** @tentative-return-type */
public static function enumCharTypes(callable $callback): void {}
+2 -2
View File
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: e8d6cf16660b6389922160f8a2c9c07ca2d58404 */
* Stub hash: 59e9bd9f059c27835f78c5b95372731d265a228a */
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlChar_hasBinaryProperty, 0, 2, _IS_BOOL, 1)
ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL)
@@ -41,7 +41,7 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_IntlChar_digit,
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_LONG, 0, "10")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlChar_enumCharNames, 0, 3, _IS_BOOL, 1)
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlChar_enumCharNames, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_MASK(0, start, MAY_BE_LONG|MAY_BE_STRING, NULL)
ZEND_ARG_TYPE_MASK(0, end, MAY_BE_LONG|MAY_BE_STRING, NULL)
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)