com php-src: Fix ext/date stubs: ext/date/php_date.stub.p hp ext/date/php_date_arginfo.h
| From: | Christoph Michael Becker | Date: | Sun, 20 Dec 2020 17:14:20 +0000 |
| Subject: | com php-src: Fix ext/date stubs: ext/date/php_date.stub.p hp ext/date/php_date_arginfo.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-114511@lists.php.net to get a copy of this message | ||
Commit: 3c68f43251e966a0057c5aebe15f2c77b899e029
Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 9 Dec 2020 16:51:53 +0100
Parents: 51f57e7b8165600be7b81a15113b150369aa7215
Branches: PHP-8.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3c68f43251e966a0057c5aebe15f2c77b899e029
Log:
Fix ext/date stubs
Closes GH-6523.
Changed paths:
M ext/date/php_date.stub.php
M ext/date/php_date_arginfo.h
Diff:
diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php
index d54d7b45663..3bd6c70a884 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 181799e1a1b..5f02e7dd788 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