diff --git a/UPGRADING b/UPGRADING index d7c640c3e2b..7d8d00b7647 100644 --- a/UPGRADING +++ b/UPGRADING @@ -205,6 +205,10 @@ PHP 8.4 UPGRADE NOTES 5. Changed Functions ======================================== +- DOM: + . DOMDocument::registerNodeClass() now has a tentative return type of true. + Previously, the return type was bool but only true could be returned in practice. + - Intl: . IntlDateFormatter::__construct() throws a ValueError if the locale is invalid. . NumberFormatter::__construct() throws a ValueError if the locale is invalid. diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php index dd52d5ca510..db86fe249b8 100644 --- a/ext/dom/php_dom.stub.php +++ b/ext/dom/php_dom.stub.php @@ -1098,7 +1098,7 @@ namespace DOM public function normalizeDocument(): void {} /** @tentative-return-type */ - public function registerNodeClass(string $baseClass, ?string $extendedClass): bool {} + public function registerNodeClass(string $baseClass, ?string $extendedClass): true {} #ifdef LIBXML_SCHEMAS_ENABLED /** @tentative-return-type */ diff --git a/ext/dom/php_dom_arginfo.h b/ext/dom/php_dom_arginfo.h index 43de4fee965..3a2ec9eddc0 100644 --- a/ext/dom/php_dom_arginfo.h +++ b/ext/dom/php_dom_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: dc65484181a06009b064b650edbb9d831a56fd7c */ + * Stub hash: 5512165ddaad08287561abac2a325e2aab3c6188 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0) ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0) @@ -509,7 +509,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_DOM_Document_normalizeDocument arginfo_class_DOMNode_normalize -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DOM_Document_registerNodeClass, 0, 2, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DOM_Document_registerNodeClass, 0, 2, IS_TRUE, 0) ZEND_ARG_TYPE_INFO(0, baseClass, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, extendedClass, IS_STRING, 1) ZEND_END_ARG_INFO()