Skip to content

Commit 54c8661

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Fix ext/date stubs
2 parents c7cccc1 + 3c68f43 commit 54c8661

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ext/date/php_date.stub.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function date_sub(DateTime $object, DateInterval $interval): DateTime {}
5757

5858
function date_timezone_get(DateTimeInterface $object): DateTimeZone|false {}
5959

60-
function date_timezone_set(DateTimeInterface $object, DateTimeZone $timezone): DateTime {}
60+
function date_timezone_set(DateTime $object, DateTimeZone $timezone): DateTime {}
6161

6262
function date_offset_get(DateTimeInterface $object): int {}
6363

@@ -105,12 +105,12 @@ function date_default_timezone_get(): string {}
105105
function date_sunrise(
106106
int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING,
107107
?float $latitude = null, ?float $longitude = null, ?float $zenith = null,
108-
float $utcOffset = 0): string|int|float|false {}
108+
?float $utcOffset = null): string|int|float|false {}
109109

110110
function date_sunset(
111111
int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING,
112112
?float $latitude = null, ?float $longitude = null, ?float $zenith = null,
113-
float $utcOffset = 0): string|int|float|false {}
113+
?float $utcOffset = null): string|int|float|false {}
114114

115115
function date_sun_info(int $timestamp, float $latitude, float $longitude): array {}
116116

@@ -361,7 +361,7 @@ public function getLocation() {}
361361
public static function listAbbreviations() {}
362362

363363
/**
364-
* @return array|false
364+
* @return array
365365
* @alias timezone_identifiers_list
366366
*/
367367
public static function listIdentifiers(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode = null) {}

ext/date/php_date_arginfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 07d0e6179d838847d4a5d454f8b56438f8df19c0 */
2+
* Stub hash: 65e429036ef2ee45f31688bc2af94dc26a1b973a */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
@@ -110,7 +110,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_timezone_get, 0, 1, Dat
110110
ZEND_END_ARG_INFO()
111111

112112
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_timezone_set, 0, 2, DateTime, 0)
113-
ZEND_ARG_OBJ_INFO(0, object, DateTimeInterface, 0)
113+
ZEND_ARG_OBJ_INFO(0, object, DateTime, 0)
114114
ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 0)
115115
ZEND_END_ARG_INFO()
116116

@@ -214,7 +214,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_date_sunrise, 0, 1, MAY_BE_STRIN
214214
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, latitude, IS_DOUBLE, 1, "null")
215215
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, longitude, IS_DOUBLE, 1, "null")
216216
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, zenith, IS_DOUBLE, 1, "null")
217-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, utcOffset, IS_DOUBLE, 0, "0")
217+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, utcOffset, IS_DOUBLE, 1, "null")
218218
ZEND_END_ARG_INFO()
219219

220220
#define arginfo_date_sunset arginfo_date_sunrise

0 commit comments

Comments
 (0)