Skip to content

Commit b40cae2

Browse files
authored
[ci skip] ext/dom: NEWS/UPGRADING notes for asymmetric visibility on readonly properties. (#21809)
1 parent efecd13 commit b40cae2

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ PHP NEWS
2626
- DOM:
2727
. Removed LIBXML_XINCLUDE from valid options for XMLDocument,
2828
as it was a no-op. (ndossche)
29+
. Readonly DOM properties are now declared with asymmetric visibility
30+
(public private(set)). ReflectionProperty::isWritable() reports them
31+
correctly, and external writes raise "Cannot modify private(set)
32+
property" instead of the previous readonly modification error.
33+
(David Carlier)
2934

3035
- Fileinfo:
3136
. Fixed bug GH-20679 (finfo_file() doesn't work on remote resources).

UPGRADING

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ PHP 8.6 UPGRADE NOTES
1919
1. Backward Incompatible Changes
2020
========================================
2121

22+
- DOM:
23+
. Properties previously documented as @readonly (e.g. DOMNode::$nodeType,
24+
DOMDocument::$xmlEncoding, DOMEntity::$actualEncoding, ::$encoding,
25+
::$version) are now declared with asymmetric visibility
26+
(public private(set)). Attempts to write to them from outside the
27+
class now raise "Cannot modify private(set) property <class>::$<prop>
28+
from global scope" instead of the prior readonly modification error.
29+
ReflectionProperty::isWritable() also reports these properties
30+
accurately.
31+
2232
- GD:
2333
. imagesetstyle(), imagefilter() and imagecrop() filter their
2434
array arguments types/values and raise a TypeError/ValueError

0 commit comments

Comments
 (0)