[PHP-CVS] [php-src] master: [skip ci] Document the closure $this internals change in UPGRADING.INTERNALS (#23434)

[email protected] (Nicolas Grekas via GitHub)
Newsgroups php.cvs
Message-ID <[email protected]>
Author: Nicolas Grekas (nicolas-grekas)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-08-24T15:05:45+01:00

Commit: https://github.com/php/php-src/commit/9983490424abee7d1add7a4b785077970ab94cd9
Raw diff: https://github.com/php/php-src/commit/9983490424abee7d1add7a4b785077970ab94cd9.diff

[skip ci] Document the closure $this internals change in UPGRADING.INTERNALS (#23434)

zend_create_closure(), zend_create_fake_closure() and
zend_create_partial_closure() take a zend_object* since fbb2e1f23d6, and
zend_get_closure_this_ptr() returns one since 7a5e452f14c. Neither change
was listed, so extensions built against the new headers get only a
-Wincompatible-pointer-types warning and read garbage at runtime.

Changed paths:
  M  UPGRADING.INTERNALS


Diff:

diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index dc2a35cc9c2c..bd671018e038 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -177,6 +177,11 @@ PHP 8.6 INTERNALS UPGRADE NOTES
     hand if there is one, E_WARNING for the severity, and
     ZEND_ENUM_StreamErrorCode_Generic for the code. terminating should be true
     only if the error aborts the operation.
+  . zend_create_closure(), zend_create_fake_closure() and
+    zend_create_partial_closure() now take the bound $this as a zend_object*
+    instead of a zval*. Accordingly, zend_get_closure_this_ptr() now returns
+    that zend_object*, or NULL when the closure is unbound, instead of a
+    zval* that is IS_UNDEF when the closure is unbound.
 
 - Added:
   . New zend_class_entry.ce_flags2 and zend_function.fn_flags2 fields were
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.