Skip to content

Commit d8268f1

Browse files
authored
Change return type of registerNodeClass to true (#12960)
1 parent 0870da3 commit d8268f1

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ PHP 8.4 UPGRADE NOTES
205205
5. Changed Functions
206206
========================================
207207

208+
- DOM:
209+
. DOMDocument::registerNodeClass() now has a tentative return type of true.
210+
Previously, the return type was bool but only true could be returned in practice.
211+
208212
- Intl:
209213
. IntlDateFormatter::__construct() throws a ValueError if the locale is invalid.
210214
. NumberFormatter::__construct() throws a ValueError if the locale is invalid.

ext/dom/php_dom.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ public function importNode(Node $node, bool $deep = false) {}
10981098
public function normalizeDocument(): void {}
10991099

11001100
/** @tentative-return-type */
1101-
public function registerNodeClass(string $baseClass, ?string $extendedClass): bool {}
1101+
public function registerNodeClass(string $baseClass, ?string $extendedClass): true {}
11021102

11031103
#ifdef LIBXML_SCHEMAS_ENABLED
11041104
/** @tentative-return-type */

ext/dom/php_dom_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)