#
24e5e4ec |
| 08-Oct-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-8996: DOMNode serialization on PHP ^8.1 PHP 8.1 introduced a seemingly unintentional BC break in ca94d55a19 by blocking the (un)serialization of DOM objects. This was done bec
Fix GH-8996: DOMNode serialization on PHP ^8.1 PHP 8.1 introduced a seemingly unintentional BC break in ca94d55a19 by blocking the (un)serialization of DOM objects. This was done because the serialization never really worked and just resulted in an empty object, which upon unserialization just resulted in an object that you can't use. Users can however implement their own serialization methods, but the commit made that impossible as the ACC flag gets passed down to the child class. An approach was tried in #10307 with a new ACC flag to selectively allow serialization with subclasses if they implement the right methods. However, that was found to be too ad hoc. Instead, let's abuse how the __sleep and __wakeup methods work to throw the exception instead. If the child class implements the __serialize / __unserialize method, then the throwing methods won't be called. Similarly, if the child class implements __sleep and __wakeup, then they're overridden and it doesn't matter that they throw. For the user, this PR has the exact same behaviour for (sub)classes that don't implement the serialization methods: an exception will be thrown. For code that previously implemented subclasses with these methods, this approach will make that code work again. This approach should be both BC preserving and unbreak user's code. Closes GH-12388. For the test: Co-authored-by: wazelin <contact@sergeimikhailov.com>
show more ...
|
#
c174ebfc |
| 19-Jun-2023 |
nielsdos <7771979+nielsdos@users.noreply.github.com> |
Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM" This reverts commit 7eb3e9cd173fbdd39e
Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM" This reverts commit 7eb3e9cd173fbdd39eefa791aab610858e76399d. Although the fix follows the spec, it causes issues because a lot of old code assumes the incorrect behaviour PHP had since a long time. We cannot do this yet, especially not in a stable release. We revert this for the time being. See GH-11428.
show more ...
|
#
7eb3e9cd |
| 16-Jun-2023 |
nielsdos <7771979+nielsdos@users.noreply.github.com> |
Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM The NULL namespace is only correct when there i
Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM The NULL namespace is only correct when there is no default namespace override. When there is, we need to manually set it to the empty string namespace. Closes GH-11428.
show more ...
|
#
b1d8e240 |
| 03-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix bug #67440: append_node of a DOMDocumentFragment does not reconcile namespaces The test was amended from the original issue report. For the test: Co-authored-by: php@deep-freeze.ca
Fix bug #67440: append_node of a DOMDocumentFragment does not reconcile namespaces The test was amended from the original issue report. For the test: Co-authored-by: php@deep-freeze.ca The problem is that the regular dom_reconcile_ns() only works on a single node. We actually have to reconciliate the whole tree in case a fragment was added. This also required to move some code around such that this special case could be handled separately. Closes GH-11362.
show more ...
|
#
c473787a |
| 06-Jan-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-10234: Setting DOMAttr::textContent results in an empty attribute value We can't directly call xmlNodeSetContent, because it might encode the string through xmlStringLenGetNodeLis
Fix GH-10234: Setting DOMAttr::textContent results in an empty attribute value We can't directly call xmlNodeSetContent, because it might encode the string through xmlStringLenGetNodeList for types XML_DOCUMENT_FRAG_NODE, XML_ELEMENT_NODE, XML_ATTRIBUTE_NODE. In these cases we need to use a text node to avoid the encoding. For the other cases, we *can* rely on xmlNodeSetContent because it is either a no-op, or handles the content without encoding and clears the properties field if needed. The test was taken from the issue report, for the test: Co-authored-by: ThomasWeinert <thomas@weinert.info> Closes GH-10245.
show more ...
|
#
6027d441c |
| 04-Aug-2022 |
NathanFreeman <1056159381@qq.com> |
Fix #79451: DOMDocument->replaceChild on doctype causes double free We have to reset intSubset if replacing doctype with another doctype node. Closes GH-9201. Closes GH-9376.
|
#
d6831e9a |
| 19-Aug-2022 |
George Peter Banyard |
Revert Fixed bug #79451 The fix for 8.1 and above is not identical and I don't know how to fix without breaking the whole build apparently
|
#
5739dd00 |
| 19-Aug-2022 |
George Peter Banyard |
Fix bad merge
|
#
1d4300d8 |
| 30-Jul-2022 |
NathanFreeman <1056159381@qq.com> |
Fix bug #79451: Using DOMDocument->replaceChild on doctype causes double free Closes GH-9201
|
Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3, php-8.1.2RC1, php-8.1.0, php-7.3.33, php-7.3.32, php-7.3.31 |
|
#
781e6b4d |
| 08-Sep-2021 |
Tim Starling |
Fix O(N) performance of DOMNode::replaceChild() and DOMNode::removeChild() Don't loop over all children to determine if the target node really is a child, just trust the parent pointer.
Fix O(N) performance of DOMNode::replaceChild() and DOMNode::removeChild() Don't loop over all children to determine if the target node really is a child, just trust the parent pointer. Add tests.
show more ...
|
Revision tags: php-7.3.30, php-7.3.29 |
|
#
aff36587 |
| 29-Jun-2021 |
Patrick Allaert |
Fixed some spaces used instead of tabs |
#
e7135cb8 |
| 14-May-2021 |
George Peter Banyard |
Use zend_string_equals_* API in a couple of more place Closes GH-6979 |
#
01b3fc03 |
| 06-May-2021 |
KsaR |
Update http->https in license (#6945) 1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https. 2. Update few license 3.0 to 3.01 as
Update http->https in license (#6945) 1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https. 2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier". 3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted. 4. fixed indentation in some files before |
show more ...
|
Revision tags: php-7.3.28 |
|
#
d842bc7e |
| 09-Apr-2021 |
George Peter Banyard |
Refactor dom_has_feature() to use zend_string* |
Revision tags: php-7.3.27, php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24, php-7.3.24RC1 |
|
#
5caaf40b |
| 29-Sep-2020 |
George Peter Banyard |
Introduce pseudo-keyword ZEND_FALLTHROUGH And use it instead of comments |
#
e0aab741 |
| 16-Mar-2021 |
Máté Kocsis |
Promote DOM invalid state errors during property access Closes GH-6780 |
#
3e01f5af |
| 15-Jan-2021 |
Nikita Popov |
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
show more ...
|
Revision tags: php-7.3.23, php-7.3.23RC1, php-7.3.22, php-7.3.22RC1, php-7.3.21, php-7.3.21RC1, php-7.3.20, php-7.3.20RC1, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1, php-7.3.18RC1 |
|
#
8fef83dd |
| 19-Apr-2020 |
George Peter Banyard |
Promote warnings to error in DOM extension Closes GH-5418 |
#
2b5de6f8 |
| 01-Jul-2020 |
Max Semenik |
Remove proto comments from C files Closes GH-5758 |
#
62b1d2cb |
| 12-May-2020 |
George Peter Banyard |
Fix [-Wundef] warning in DOM extension |
Revision tags: php-7.2.30, php-7.3.17 |
|
#
dfd0acf0 |
| 11-Apr-2020 |
Máté Kocsis |
Generate method entries for ext/dom Closes GH-5374 |
Revision tags: php-7.3.17RC1 |
|
#
305b17e8 |
| 29-Mar-2020 |
Máté Kocsis |
Do not include the same stub multiple times Closes GH-5322 |
Revision tags: php-7.3.18, php-7.3.16, php-7.3.16RC1 |
|
#
5acd86df |
| 28-Feb-2020 |
Benjamin Eberlei |
[RFC] Implement new DOM Living Standard APIs in ext/dom |
#
4804dc2b |
| 17-Feb-2020 |
Christoph M. Becker |
Rename php_dom_create_interator() to php_dom_create_iterator() Thus fixing an obvious typo. |
#
406c5d59 |
| 17-Feb-2020 |
Christoph M. Becker |
Merge branch 'PHP-7.4' * PHP-7.4: Fix #79271: DOMDocumentType::$childNodes is NULL
|