[php-src] PR #23501: dom: invalidate node list caches on class attribute mutations
| From: | iliaal | Date: | Sat, 29 Aug 2026 12:02:18 +0000 |
| Subject: | [php-src] PR #23501: dom: invalidate node list caches on class attribute mutations | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38195@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23501
Author: iliaal
Mutating an element class through the reflected className property, classList mutations, or
removeAttribute(), removeAttributeNS() and removeAttributeNode() modified the underlying attribute
without bumping the document cache tag, so live collections such as getElementsByClassName() kept
returning stale lengths and items afterwards. Each of these mutation points now invalidates the node
list caches with php_libxml_invalidate_node_list_cache(). Attr::$value, setAttributeNode and
setAttributeNS were audited and already invalidate correctly.