Backport some intl stub changes from master

While we're not sure under what circumstances they would fail,
they're fallible on the implementation level.
This commit is contained in:
Nikita Popov 2021-07-14 11:55:12 +02:00
parent 88d6fbe05e
commit 2afbacc16d
4 changed files with 41 additions and 41 deletions

View File

@ -20,7 +20,7 @@ class IntlCalendar
public function equals(IntlCalendar $other) {}
/**
* @return int
* @return int|false
* @alias intlcal_field_difference
*/
public function fieldDifference(float $timestamp, int $field) {}
@ -56,19 +56,19 @@ class IntlCalendar
public static function fromDateTime(DateTime|string $datetime, ?string $locale = null) {}
/**
* @return int
* @return int|false
* @alias intlcal_get
*/
public function get(int $field) {}
/**
* @return int
* @return int|false
* @alias intlcal_get_actual_maximum
*/
public function getActualMaximum(int $field) {}
/**
* @return int
* @return int|false
* @alias intlcal_get_actual_minimum
*/
public function getActualMinimum(int $field) {}
@ -80,7 +80,7 @@ class IntlCalendar
public static function getAvailableLocales() {}
/**
* @return int
* @return int|false
* @alias intlcal_get_day_of_week_type
*/
public function getDayOfWeekType(int $dayOfWeek) {}
@ -98,13 +98,13 @@ class IntlCalendar
public function getErrorMessage() {}
/**
* @return int
* @return int|false
* @alias intlcal_get_first_day_of_week
*/
public function getFirstDayOfWeek() {}
/**
* @return int
* @return int|false
* @alias intlcal_get_greatest_minimum
*/
public function getGreatestMinimum(int $field) {}
@ -116,25 +116,25 @@ class IntlCalendar
public static function getKeywordValuesForLocale(string $keyword, string $locale, bool $onlyCommon) {}
/**
* @return int
* @return int|false
* @alias intlcal_get_least_maximum
*/
public function getLeastMaximum(int $field) {}
/**
* @return string
* @return string|false
* @alias intlcal_get_locale
*/
public function getLocale(int $type) {}
/**
* @return int
* @return int|false
* @alias intlcal_get_maximum
*/
public function getMaximum(int $field) {}
/**
* @return int
* @return int|false
* @alias intlcal_get_minimal_days_in_first_week
*/
public function getMinimalDaysInFirstWeek() {}
@ -146,7 +146,7 @@ class IntlCalendar
public function setMinimalDaysInFirstWeek(int $days) {}
/**
* @return int
* @return int|false
* @alias intlcal_get_minimum
*/
public function getMinimum(int $field) {}
@ -170,7 +170,7 @@ class IntlCalendar
public function getSkippedWallTimeOption() {}
/**
* @return float
* @return float|false
* @alias intlcal_get_time
*/
public function getTime() {}
@ -188,7 +188,7 @@ class IntlCalendar
public function getType() {}
/**
* @return int
* @return int|false
* @alias intlcal_get_weekend_transition
*/
public function getWeekendTransition(int $dayOfWeek) {}

View File

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 18a92d3af801f11e5c3b90e5d272fd98b3515c40 */
* Stub hash: 9c4f78dc00000876a28250515573a34b44f082dc */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar___construct, 0, 0, 0)
ZEND_END_ARG_INFO()

View File

@ -17,9 +17,9 @@ function intlcal_get_now(): float {}
function intlcal_get_available_locales(): array {}
function intlcal_get(IntlCalendar $calendar, int $field): int {}
function intlcal_get(IntlCalendar $calendar, int $field): int|false {}
function intlcal_get_time(IntlCalendar $calendar): float {}
function intlcal_get_time(IntlCalendar $calendar): float|false {}
function intlcal_set_time(IntlCalendar $calendar, float $timestamp): bool {}
@ -39,35 +39,35 @@ function intlcal_roll(IntlCalendar $calendar, int $field, $value): bool {}
function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {}
function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int $field): int {}
function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int $field): int|false {}
function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field): int {}
function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field): int|false {}
function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field): int {}
function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field): int|false {}
function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek): int {}
function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek): int|false {}
function intlcal_get_first_day_of_week(IntlCalendar $calendar): int {}
function intlcal_get_first_day_of_week(IntlCalendar $calendar): int|false {}
function intlcal_get_least_maximum(IntlCalendar $calendar, int $field): int {}
function intlcal_get_least_maximum(IntlCalendar $calendar, int $field): int|false {}
function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field): int {}
function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field): int|false {}
function intlcal_get_locale(IntlCalendar $calendar, int $type): string {}
function intlcal_get_locale(IntlCalendar $calendar, int $type): string|false {}
function intlcal_get_maximum(IntlCalendar $calendar, int $field): int {}
function intlcal_get_maximum(IntlCalendar $calendar, int $field): int|false {}
function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar): int {}
function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar): int|false {}
function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): bool {}
function intlcal_get_minimum(IntlCalendar $calendar, int $field): int {}
function intlcal_get_minimum(IntlCalendar $calendar, int $field): int|false {}
function intlcal_get_time_zone(IntlCalendar $calendar): IntlTimeZone|false {}
function intlcal_get_type(IntlCalendar $calendar): string {}
function intlcal_get_weekend_transition(IntlCalendar $calendar, int $dayOfWeek): int {}
function intlcal_get_weekend_transition(IntlCalendar $calendar, int $dayOfWeek): int|false {}
function intlcal_in_daylight_time(IntlCalendar $calendar): bool {}

View File

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 7c89762dffb3a8b4aae51ea823af2494e7dd25d5 */
* Stub hash: 9d40cc3b008e968f4ae28e147209095c698334a5 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1)
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null")
@ -18,12 +18,12 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_available_locales, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get, 0, 2, IS_LONG, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_time, 0, 1, IS_DOUBLE, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_time, 0, 1, MAY_BE_DOUBLE|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_END_ARG_INFO()
@ -71,7 +71,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_clear, 0, 1, _IS_BOOL, 0
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, field, IS_LONG, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_field_difference, 0, 3, IS_LONG, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_field_difference, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_ARG_TYPE_INFO(0, timestamp, IS_DOUBLE, 0)
ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
@ -81,12 +81,12 @@ ZEND_END_ARG_INFO()
#define arginfo_intlcal_get_actual_minimum arginfo_intlcal_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_day_of_week_type, 0, 2, IS_LONG, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_day_of_week_type, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_ARG_TYPE_INFO(0, dayOfWeek, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_first_day_of_week, 0, 1, IS_LONG, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_first_day_of_week, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_END_ARG_INFO()
@ -94,7 +94,7 @@ ZEND_END_ARG_INFO()
#define arginfo_intlcal_get_greatest_minimum arginfo_intlcal_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_locale, 0, 2, IS_STRING, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_locale, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
ZEND_END_ARG_INFO()
@ -148,11 +148,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set_lenient, 0, 2, _IS_B
ZEND_ARG_TYPE_INFO(0, lenient, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
#define arginfo_intlcal_get_repeated_wall_time_option arginfo_intlcal_get_first_day_of_week
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_repeated_wall_time_option, 0, 1, IS_LONG, 0)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_END_ARG_INFO()
#define arginfo_intlcal_equals arginfo_intlcal_after
#define arginfo_intlcal_get_skipped_wall_time_option arginfo_intlcal_get_first_day_of_week
#define arginfo_intlcal_get_skipped_wall_time_option arginfo_intlcal_get_repeated_wall_time_option
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set_repeated_wall_time_option, 0, 2, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
@ -170,9 +172,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intlcal_to_date_time, 0, 1,
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_error_code, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_END_ARG_INFO()
#define arginfo_intlcal_get_error_code arginfo_intlcal_get_first_day_of_week
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_error_message, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)