diff --git a/NEWS b/NEWS index 0443ac23f47..2595b1ea4b9 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,10 @@ PHP NEWS . Added zend_call_stack_get implementation for OpenBSD. (David Carlier) . Fixed oss-fuzz #60411 (Fix double-compilation of arrow-functions). (ilutov) . Fixed build for FreeBSD before the 11.0 releases. (David Carlier) + . Add stack limit check in zend_eval_const_expr(). (Arnaud) + . Expose time spent collecting cycles in gc_status(). (Arnaud) + . Remove WeakMap entries whose key is only reachable through the entry value. + (Arnaud) - DOM: . Added DOMNode::contains() and DOMNameSpaceNode::contains(). (nielsdos) @@ -48,7 +52,7 @@ PHP NEWS (Marc Bennewitz) . Prevent precision loss on formatting decimal integers in number_format(). (Marc Bennewitz) - . Added usage of posix_spawn for proc_open when supported by OS. + . Added usage of posix_spawn for proc_open when supported by OS. (Cristian Rodriguez) - Streams: diff --git a/UPGRADING b/UPGRADING index 17bd4b88fff..434fdc1fd56 100644 --- a/UPGRADING +++ b/UPGRADING @@ -45,6 +45,10 @@ PHP 8.3 UPGRADE NOTES RFC: https://wiki.php.net/rfc/arbitrary_static_variable_initializers . Class constant visibility variance is now correctly checked when inherited from interfaces. + . WeakMaps entries whose key maps to itself (possibly transitively) may now be + removed during cycle collection if the key is not reachable except by + iterating over the WeakMap (reachability via iteration is considered weak). + Previously, such entries would never be automatically removed. - FFI: . C functions that have a return type of void now return null instead of @@ -311,6 +315,13 @@ PHP 8.3 UPGRADE NOTES 9. Other Changes to Extensions ======================================== +- Core: + . WeakMaps now have ephemeron-like behavior: Entries whose key maps to itself + (possibly transitively) may be removed during cycle collection if the key is + not reachable except by iterating over the WeakMap (reachability via + iteration is considered weak). Previously, such entries would never be + automatically removed. (See GH-10932.) + - DOM: . The DOM lifetime mechanism has been reworked such that implicitly removed nodes can still be fetched. Previously this resulted in an exception.