[php-src] PHP-8.2: Fix phpdoc for DOMDocument load methods

From: Date: Wed, 20 Mar 2024 16:37:47 +0000
Subject: [php-src] PHP-8.2: Fix phpdoc for DOMDocument load methods
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-127813@lists.php.net to get a copy of this message
Author: Vincent Langlet (VincentLanglet) Committer: Niels Dossche (nielsdos) Date: 2024-03-20T17:22:04+01:00 Commit: https://github.com/php/php-src/commit/741570c30fffc77b67954ff8938d410cc0ff8329 Raw diff: https://github.com/php/php-src/commit/741570c30fffc77b67954ff8938d410cc0ff8329.diff Fix phpdoc for DOMDocument load methods Closes GH-13763. Changed paths: M NEWS M ext/dom/php_dom.stub.php M ext/dom/php_dom_arginfo.h Diff: diff --git a/NEWS b/NEWS index 8afb4a4c8250..72d6f9a3971c 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 9806a863a293..0ed7b4544a50 100644 --- a/ext/dom/php_dom.stub.php +++ b/ext/dom/php_dom.stub.php @@ -743,11 +743,11 @@ public function getElementsByTagNameNS(?string $namespace, string $localName): D /** @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 @@ 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 */ - 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 6618238991dc..6aa7f2eb8a38 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)

« previous php.cvs (#127813) next »