Skip to content

Commit 47ec320

Browse files
authored
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".
1 parent 58c0202 commit 47ec320

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

ext/dom/php_dom.stub.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,9 +1515,7 @@ abstract class Document extends Node implements ParentNode
15151515
{
15161516
/** @readonly */
15171517
public Implementation $implementation;
1518-
/** @readonly */
15191518
public string $URL;
1520-
/** @readonly */
15211519
public string $documentURI;
15221520
public string $characterSet;
15231521
public string $charset;

ext/dom/php_dom_arginfo.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)