Skip to content

Change return type of registerNodeClass to true #12960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ext/dom/php_dom.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ public function importNode(Node $node, bool $deep = false) {}
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 */
Expand Down
4 changes: 2 additions & 2 deletions ext/dom/php_dom_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.