Skip to content

Fix return type of loading DOM documents on PHP 8.2 branche. #13763

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

Closed
wants to merge 2 commits into from
Closed
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
8 changes: 4 additions & 4 deletions ext/dom/php_dom.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,10 @@ public function getElementsByTagNameNS(?string $namespace, string $localName): D
/** @return DOMNode|false */
public function importNode(DOMNode $node, bool $deep = false) {}

/** @return DOMDocument|bool */
/** @return bool */
public function load(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope

/** @return DOMDocument|bool */
/** @return bool */
public function loadXML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope

/** @tentative-return-type */
Expand All @@ -759,10 +759,10 @@ public function registerNodeClass(string $baseClass, ?string $extendedClass): bo
public function save(string $filename, int $options = 0): int|false {}

#ifdef LIBXML_HTML_ENABLED
/** @return DOMDocument|bool */
/** @return bool */
public function loadHTML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope

/** @return DOMDocument|bool */
/** @return bool */
public function loadHTMLFile(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope

/** @tentative-return-type */
Expand Down
2 changes: 1 addition & 1 deletion ext/dom/php_dom_arginfo.h

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