summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-12-20 18:14:40 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-12-20 18:14:40 +0100
commit54c866106e51d8fff2ad240febca7871e6b086a9 (patch)
tree16384c33b2d57541ef7204f751a82e1c1f4985ef
parentc7cccc1c9a2e6bf41dc82a80e0772b52c70b06f0 (diff)
parent3c68f43251e966a0057c5aebe15f2c77b899e029 (diff)
downloadphp-git-54c866106e51d8fff2ad240febca7871e6b086a9.tar.gz
Merge branch 'PHP-8.0'
* PHP-8.0: Fix ext/date stubs
-rw-r--r--ext/date/php_date.stub.php8
-rw-r--r--ext/date/php_date_arginfo.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php
index d54d7b4566..3bd6c70a88 100644
--- a/ext/date/php_date.stub.php
+++ b/ext/date/php_date.stub.php
@@ -57,7 +57,7 @@ function date_sub(DateTime $object, DateInterval $interval): DateTime {}
function date_timezone_get(DateTimeInterface $object): DateTimeZone|false {}
-function date_timezone_set(DateTimeInterface $object, DateTimeZone $timezone): DateTime {}
+function date_timezone_set(DateTime $object, DateTimeZone $timezone): DateTime {}
function date_offset_get(DateTimeInterface $object): int {}
@@ -105,12 +105,12 @@ function date_default_timezone_get(): string {}
function date_sunrise(
int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING,
?float $latitude = null, ?float $longitude = null, ?float $zenith = null,
- float $utcOffset = 0): string|int|float|false {}
+ ?float $utcOffset = null): string|int|float|false {}
function date_sunset(
int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING,
?float $latitude = null, ?float $longitude = null, ?float $zenith = null,
- float $utcOffset = 0): string|int|float|false {}
+ ?float $utcOffset = null): string|int|float|false {}
function date_sun_info(int $timestamp, float $latitude, float $longitude): array {}
@@ -361,7 +361,7 @@ class DateTimeZone
public static function listAbbreviations() {}
/**
- * @return array|false
+ * @return array
* @alias timezone_identifiers_list
*/
public static function listIdentifiers(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode = null) {}
diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h
index 181799e1a1..5f02e7dd78 100644
--- a/ext/date/php_date_arginfo.h
+++ b/ext/date/php_date_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 07d0e6179d838847d4a5d454f8b56438f8df19c0 */
+ * Stub hash: 65e429036ef2ee45f31688bc2af94dc26a1b973a */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
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
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_timezone_set, 0, 2, DateTime, 0)
- ZEND_ARG_OBJ_INFO(0, object, DateTimeInterface, 0)
+ ZEND_ARG_OBJ_INFO(0, object, DateTime, 0)
ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 0)
ZEND_END_ARG_INFO()
@@ -214,7 +214,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_date_sunrise, 0, 1, MAY_BE_STRIN
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, latitude, IS_DOUBLE, 1, "null")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, longitude, IS_DOUBLE, 1, "null")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, zenith, IS_DOUBLE, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, utcOffset, IS_DOUBLE, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, utcOffset, IS_DOUBLE, 1, "null")
ZEND_END_ARG_INFO()
#define arginfo_date_sunset arginfo_date_sunrise