Commit 0db31e369ce for php.net

commit 0db31e369ce454cdbb9db746200a17e9d4cdf0f7
Merge: a738269c3e5 fbca6cb2219
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date:   Sun Aug 30 11:55:56 2026 -0400

    Merge branch 'PHP-8.5'

    * PHP-8.5:
      dom: invalidate node list caches on class attribute mutations

diff --cc NEWS
index f79aeae7429,693ff78fafd..2dd3d1275b5
--- a/NEWS
+++ b/NEWS
@@@ -1,56 -1,6 +1,60 @@@
  PHP                                                                        NEWS
  |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 -?? ??? ????, PHP 8.5.11
 +?? ??? ????, PHP 8.6.0beta3
 +
 +- CLI:
 +  . Fixed bug GH-23242 (PHP development server does not support Expect
 +    100-continue flow control). (Sjoerd Langkemper)
 +
++- DOM:
++  . Fixed stale getElementsByClassName() and other node list caches after
++    className/classList writes and attribute removals. (Ilia Alshanetsky)
++
 +- Intl:
 +  . Fixed a memory leak when dumping IntlCalendar instances. (Ilia Alshanetsky)
 +  . Fixed Collator::sortWithSortKeys() allocating fixed 2MiB buffers
 +    regardless of array size. (Ilia Alshanetsky)
 +  . Fixed a memory leak when iterating IntlBreakIterator::getPartsIterator()
 +    results. (iliaal)
 +  . Fixed a leak in Locale::getKeywords() when a keyword value cannot be
 +    read. (iliaal)
 +  . Fixed a use-after-free when IntlRuleBasedBreakIterator is constructed
 +    from compiled rules. (iliaal)
 +
 +- PDO_PGSQL:
 +  . Added Pdo\Pgsql::ATTR_CHUNK_SIZE to fetch a result set in chunks of the
 +    given number of rows. (KentarouTakeda)
 +
 +- PGSQL:
 +  . Fixed the pg_insert(), pg_update() and pg_delete() flag error messages,
 +    which did not name the set of flags actually accepted. (lacatoire)
 +
 +- Phar:
 +  . Fixed bug GH-23418 (Use-after-free when looking up mounted directories).
 +    (Weilin Du)
 +  . Fixed bug GH-23477 (Memory leak on duplicate native Phar manifest entries).
 +    (Weilin Du)
 +
 +- Sockets:
 +  . Fixed socket_set_option() with SO_ATTACH_REUSEPORT_CBPF and a zero value,
 +    which detached the classic BPF filter instead of the reuseport program.
 +    (David Carlier)
 +
 +- Standard:
 +  . Fixed a segfault when a stream filter callback unsets StreamBucket::$data
 +    before re-attaching the bucket. (iliaal)
 +  . Fixed an out-of-bounds read when following a redirect response with an
 +    empty Location header. (iliaal)
 +  . Fixed read buffer compaction in php_stream_filter_flush(). (crystarm)
 +  . Io\Poll\Context::wait() now rejects a $maxEvents value greater than
 +    INT_MAX instead of truncating it. (marc-mabe)
 +
 +- SimpleXML:
 +  . Fixed writing to a dimension of the object returned by attributes() not
 +    creating the attribute. (Ilia Alshanetsky)
 +
 +
 +27 Aug 2026, PHP 8.6.0beta2

  - Core:
    . Fixed bug GH-15375 (Nested "yield from" skips items after a valid() or
diff --cc ext/dom/element.c
index 354466623ca,8dd7f375605..5fcffaf4205
--- a/ext/dom/element.c
+++ b/ext/dom/element.c
@@@ -595,8 -598,9 +596,9 @@@ static bool dom_remove_attribute(xmlNod
  		}
  		case XML_ATTRIBUTE_DECL:
  			return false;
 -		EMPTY_SWITCH_DEFAULT_CASE();
 +		default: ZEND_UNREACHABLE();
  	}
+ 	php_libxml_invalidate_node_list_cache(document);
  	return true;
  }