diff --git a/NEWS b/NEWS index 8afb4a4c825..72d6f9a3971 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ PHP NEWS - DOM: . Add some missing ZPP checks. (nielsdos) . Fix potential memory leak in XPath evaluation results. (nielsdos) + . Fix phpdoc for DOMDocument load methods. (VincentLanglet) - GD: . Fixed bug GH-12019 (add GDLIB_CFLAGS in feature tests). (Michael Orlitzky) diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php index 9806a863a29..0ed7b4544a5 100644 --- a/ext/dom/php_dom.stub.php +++ b/ext/dom/php_dom.stub.php @@ -743,11 +743,11 @@ class DOMDocument extends DOMNode implements DOMParentNode /** @return DOMNode|false */ public function importNode(DOMNode $node, bool $deep = false) {} - /** @return DOMDocument|bool */ - public function load(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope + /** @return bool */ + public function load(string $filename, int $options = 0) {} - /** @return DOMDocument|bool */ - public function loadXML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope + /** @return bool */ + public function loadXML(string $source, int $options = 0) {} /** @tentative-return-type */ public function normalizeDocument(): void {} @@ -759,11 +759,11 @@ class DOMDocument extends DOMNode implements DOMParentNode public function save(string $filename, int $options = 0): int|false {} #ifdef LIBXML_HTML_ENABLED - /** @return DOMDocument|bool */ - public function loadHTML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope + /** @return bool */ + public function loadHTML(string $source, int $options = 0) {} - /** @return DOMDocument|bool */ - public function loadHTMLFile(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope + /** @return bool */ + public function loadHTMLFile(string $filename, int $options = 0) {} /** @tentative-return-type */ public function saveHTML(?DOMNode $node = null): string|false {} diff --git a/ext/dom/php_dom_arginfo.h b/ext/dom/php_dom_arginfo.h index 6618238991d..6aa7f2eb8a3 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: 3f579ee4c3aef3bde54e9a50d23432f1bd782929 */ + * Stub hash: 7d4dc9e1a3736f2ac9082c32bf5260dfa58b1aa0 */ 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)