From 47ec32044e50936ba6b3b370d375a19e3791afbf Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 17 Apr 2024 17:35:29 +0200 Subject: [PATCH] Make documentURI and URL not readonly (#13982) These aren't actually readonly right now because `@readonly` means nothing, and the setters are configured in php_dom.c. So no functional changes here. DOM spec marks these as readonly, but the problem is that this reduces usefulness in XML contexts (like WSDL scheme handling). In context of a browser, for which DOM was designed, this actually makes sense to have as readonly because it is tied to the origin of the page etc. But PHP is not a browser. This also wasn't readonly in "old DOM". --- ext/dom/php_dom.stub.php | 2 -- ext/dom/php_dom_arginfo.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php index d744a94349727..692499407ccf1 100644 --- a/ext/dom/php_dom.stub.php +++ b/ext/dom/php_dom.stub.php @@ -1515,9 +1515,7 @@ abstract class Document extends Node implements ParentNode { /** @readonly */ public Implementation $implementation; - /** @readonly */ public string $URL; - /** @readonly */ public string $documentURI; public string $characterSet; public string $charset; diff --git a/ext/dom/php_dom_arginfo.h b/ext/dom/php_dom_arginfo.h index 5e759686bc6c3..dbb8109f44819 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: 37a1c811bfc8c611d686f0842d06fc327b54511f */ + * Stub hash: 49a153db3d3aa28031d7a15c15f89f6f3e9c33a5 */ 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)