From efecd1306b4ed40718f7171c8f2f9855249d0e08 Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Sat, 18 Apr 2026 13:28:00 -0700 Subject: [PATCH 1/2] gen_stub: set up PHP 8.6 support (#21792) Add the new known string from #20951 --- build/gen_stub.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index e68c0b77c610..db7f4d400ed7 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -26,6 +26,7 @@ const PHP_83_VERSION_ID = 80300; const PHP_84_VERSION_ID = 80400; const PHP_85_VERSION_ID = 80500; +const PHP_86_VERSION_ID = 80600; const ALL_PHP_VERSION_IDS = [ PHP_70_VERSION_ID, PHP_80_VERSION_ID, @@ -34,6 +35,7 @@ PHP_83_VERSION_ID, PHP_84_VERSION_ID, PHP_85_VERSION_ID, + PHP_86_VERSION_ID, ]; // file_put_contents() but with a success message printed after saving @@ -2921,6 +2923,11 @@ class StringBuilder { '8.5' => 'ZEND_STR_8_DOT_5', ]; + // NEW in 8.6 + private const PHP_86_KNOWN = [ + "arguments" => "ZEND_STR_ARGUMENTS", + ]; + /** * Get an array of three strings: * - declaration of zend_string, if needed, or empty otherwise @@ -2959,6 +2966,10 @@ public static function getString( } $include = self::PHP_80_KNOWN; switch ($minPhp) { + case PHP_86_VERSION_ID: + $include = array_merge($include, self::PHP_86_KNOWN); + // Intentional fall through + case PHP_85_VERSION_ID: $include = array_merge($include, self::PHP_85_KNOWN); // Intentional fall through @@ -4148,7 +4159,8 @@ public function __construct(array $fileTags) { throw new Exception( "Legacy PHP version must be one of: \"" . PHP_70_VERSION_ID . "\" (PHP 7.0), \"" . PHP_80_VERSION_ID . "\" (PHP 8.0), " . "\"" . PHP_81_VERSION_ID . "\" (PHP 8.1), \"" . PHP_82_VERSION_ID . "\" (PHP 8.2), \"" . PHP_83_VERSION_ID . "\" (PHP 8.3), " . - "\"" . PHP_84_VERSION_ID . "\" (PHP 8.4), \"" . PHP_85_VERSION_ID . "\" (PHP 8.5), \"" . $tag->value . "\" provided" + "\"" . PHP_84_VERSION_ID . "\" (PHP 8.4), \"" . PHP_85_VERSION_ID . "\" (PHP 8.5), \"" . PHP_86_VERSION_ID . "\" (PHP 8.6), " . + $tag->value . "\" provided" ); } From b40cae2b1f5979bc3a838fa425880fde1d5ac070 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Sat, 18 Apr 2026 22:47:41 +0100 Subject: [PATCH 2/2] [ci skip] ext/dom: NEWS/UPGRADING notes for asymmetric visibility on readonly properties. (#21809) --- NEWS | 5 +++++ UPGRADING | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/NEWS b/NEWS index 2000d5b4710e..8c2b185d328f 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,11 @@ PHP NEWS - DOM: . Removed LIBXML_XINCLUDE from valid options for XMLDocument, as it was a no-op. (ndossche) + . Readonly DOM properties are now declared with asymmetric visibility + (public private(set)). ReflectionProperty::isWritable() reports them + correctly, and external writes raise "Cannot modify private(set) + property" instead of the previous readonly modification error. + (David Carlier) - Fileinfo: . Fixed bug GH-20679 (finfo_file() doesn't work on remote resources). diff --git a/UPGRADING b/UPGRADING index 10a63f6b03ad..f7874c2d3472 100644 --- a/UPGRADING +++ b/UPGRADING @@ -19,6 +19,16 @@ PHP 8.6 UPGRADE NOTES 1. Backward Incompatible Changes ======================================== +- DOM: + . Properties previously documented as @readonly (e.g. DOMNode::$nodeType, + DOMDocument::$xmlEncoding, DOMEntity::$actualEncoding, ::$encoding, + ::$version) are now declared with asymmetric visibility + (public private(set)). Attempts to write to them from outside the + class now raise "Cannot modify private(set) property ::$ + from global scope" instead of the prior readonly modification error. + ReflectionProperty::isWritable() also reports these properties + accurately. + - GD: . imagesetstyle(), imagefilter() and imagecrop() filter their array arguments types/values and raise a TypeError/ValueError