diff --git a/ext/intl/dateformat/dateformat.stub.php b/ext/intl/dateformat/dateformat.stub.php index 7664fa7297d..ed49bcc0d89 100644 --- a/ext/intl/dateformat/dateformat.stub.php +++ b/ext/intl/dateformat/dateformat.stub.php @@ -176,7 +176,7 @@ class IntlDateFormatter public function format($datetime): string|false {} /** - * @param IntlCalendar|DateTime $datetime + * @param IntlCalendar|DateTimeInterface $datetime * @param array|int|string|null $format * @tentative-return-type * @alias datefmt_format_object diff --git a/ext/intl/dateformat/dateformat_arginfo.h b/ext/intl/dateformat/dateformat_arginfo.h index 4a9727b7eca..6026077c1ac 100644 --- a/ext/intl/dateformat/dateformat_arginfo.h +++ b/ext/intl/dateformat/dateformat_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 23a3a335af66ae42119678d03173ea83869d290c */ + * Stub hash: cefec46af242e6372a923dea0e1d2cf22da7ef3e */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) diff --git a/ext/intl/dateformat/dateformat_format_object.cpp b/ext/intl/dateformat/dateformat_format_object.cpp index 6afc9e6dca5..9e4697902e6 100644 --- a/ext/intl/dateformat/dateformat_format_object.cpp +++ b/ext/intl/dateformat/dateformat_format_object.cpp @@ -181,7 +181,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object) } } else { intl_error_set(NULL, status, "datefmt_format_object: the passed object " - "must be an instance of either IntlCalendar or DateTime", + "must be an instance of either IntlCalendar or DateTimeInterface", 0); RETURN_FALSE; } diff --git a/ext/intl/tests/dateformat_formatObject_error.phpt b/ext/intl/tests/dateformat_formatObject_error.phpt index 1bf84027b08..9f5a43c831f 100644 --- a/ext/intl/tests/dateformat_formatObject_error.phpt +++ b/ext/intl/tests/dateformat_formatObject_error.phpt @@ -29,7 +29,7 @@ var_dump(IntlDateFormatter::formatObject($cal, "")); ?> --EXPECTF-- -Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the passed object must be an instance of either IntlCalendar or DateTime in %s on line %d +Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the passed object must be an instance of either IntlCalendar or DateTimeInterface in %s on line %d bool(false) Warning: IntlDateFormatter::formatObject(): datefmt_format_object: bad IntlCalendar instance: not initialized properly in %s on line %d