1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Change return type of registerNodeClass to true (#12960)

This commit is contained in:
Niels Dossche
2023-12-16 18:06:56 +00:00
committed by GitHub
parent 0870da3364
commit d8268f1aba
3 changed files with 7 additions and 3 deletions

View File

@@ -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.

View File

@@ -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 */

View File

@@ -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()