From 36c3aa74fd65b30dfada0d6342e32d889d510178 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Wed, 8 Oct 2025 03:36:32 +0900 Subject: [PATCH 01/36] PHP 8.5 migration guide (WIP) --- appendices/migration85.xml | 57 +++++ appendices/migration85/constants.xml | 180 ++++++++++++++ appendices/migration85/incompatible.xml | 55 +++++ appendices/migration85/new-classes.xml | 58 +++++ appendices/migration85/new-features.xml | 298 +++++++++++++++++++++++ appendices/migration85/new-functions.xml | 151 ++++++++++++ 6 files changed, 799 insertions(+) create mode 100644 appendices/migration85.xml create mode 100644 appendices/migration85/constants.xml create mode 100644 appendices/migration85/incompatible.xml create mode 100644 appendices/migration85/new-classes.xml create mode 100644 appendices/migration85/new-features.xml create mode 100644 appendices/migration85/new-functions.xml diff --git a/appendices/migration85.xml b/appendices/migration85.xml new file mode 100644 index 000000000000..9de7f6d2ae10 --- /dev/null +++ b/appendices/migration85.xml @@ -0,0 +1,57 @@ + + + Migrating from PHP 8.4.x to PHP 8.5.x + + + This new minor version brings with it a number of + new features and a + few incompatibilities + that should be tested for before switching PHP versions in production + environments. + + + + &manual.migration.seealso; + 7.1.x, + 7.2.x, + 7.3.x, + 7.4.x, + 8.0.x, + 8.1.x, + 8.2.x. + 8.3.x. + 8.4.x. + + + &appendices.migration85.new-features; + &appendices.migration85.new-classes; + &appendices.migration85.new-functions; + &appendices.migration85.constants; + &appendices.migration85.incompatible; + + + + diff --git a/appendices/migration85/constants.xml b/appendices/migration85/constants.xml new file mode 100644 index 000000000000..76a47c83f314 --- /dev/null +++ b/appendices/migration85/constants.xml @@ -0,0 +1,180 @@ + + + New Global Constants + + + Core + + + + PHP_BUILD_DATE + + + PHP_BUILD_PROVIDER + + + + + + cURL + + + + CURLINFO_USED_PROXY + + + CURLINFO_HTTPAUTH_USED + + + CURLINFO_PROXYAUTH_USED + + + CURLINFO_CONN_ID + + + CURLINFO_QUEUE_TIME_T + + + CURLOPT_INFILESIZE_LARGE + + + CURLFOLLOW_ALL + + + CURLFOLLOW_OBEYCODE + + + CURLFOLLOW_FIRSTONLY + + + + + + Intl + + + + DECIMAL_COMPACT_SHORT + + + DECIMAL_COMPACT_LONG + + + + + + OpenSSL + + + OPENSSL_PKCS1_PSS_PADDING + PKCS7_NOSMIMECAP + PKCS7_CRLFEOL + PKCS7_NOCRL + PKCS7_NO_DUAL_CONTENT + + + + + POSIX + + + POSIX_SC_OPEN_MAX + + + + + Sockets + + + + IPPROTO_ICMP + + + IPPROTO_ICMPV6 + + + TCP_FUNCTION_BLK (FreeBSD only) + + + TCP_FUNCTION_ALIAS (FreeBSD only) + + + TCP_REUSPORT_LB_NUMA (FreeBSD only) + + + TCP_REUSPORT_LB_NUMA_NODOM (FreeBSD only) + + + TCP_REUSPORT_LB_NUMA_CURDOM (FreeBSD only) + + + TCP_BBR_ALGORITHM (FreeBSD only) + + + AF_PACKET (Linux only) + + + IP_BINDANY (FreeBSD/NetBSD/OpenBSD only) + + + SO_BUSY_POLL (Linux only) + + + UDP_SEGMENT (Linux only) + + + SHUT_RD + + + SHUT_WR + + + SHUT_RDWR + + + + + + Tokenizer + + + T_VOID_CAST + + + T_PIPE + + + + + + Standard + + + + IMAGETYPE_SVG + when libxml is loaded. + + + + + + diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml new file mode 100644 index 000000000000..89ada23ff770 --- /dev/null +++ b/appendices/migration85/incompatible.xml @@ -0,0 +1,55 @@ + + + Backward Incompatible Changes + + + PHP Core + + + <literal>"array"</literal> and <literal>"callable"</literal> alias name + + + It is no longer possible to use "array" + and "callable" as class alias names + in class_alias + + + + + + Loosely comparing uncomparable objects + + + Loosely comparing uncomparable objects (e.g. enums, \CurlHandle and other + internal classes) to booleans was previously inconsistent. If compared to a + boolean literal $object == true, it would behave the same way as (bool) + $object. If compared to a statically unknown value $object == $true, it + would always return false. This behavior was consolidated to always follow + the behavior of (bool) $object. + + + + + + + + diff --git a/appendices/migration85/new-classes.xml b/appendices/migration85/new-classes.xml new file mode 100644 index 000000000000..a0f50aefa416 --- /dev/null +++ b/appendices/migration85/new-classes.xml @@ -0,0 +1,58 @@ + + + New Classes and Interfaces + + + Core + + NoDiscard + DelayedTargetValidation + + + + + + + Curl + + CurlSharePersistentHandle + + + + + + URI + + Uri\UriException + Uri\InvalidUriException + Uri\UriComparisonMode + Uri\Rfc3986\Uri + Uri\WhatWg\InvalidUrlException + Uri\WhatWg\UrlValidationErrorType + Uri\WhatWg\UrlValidationError + Uri\WhatWg\Url + + + + + + diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml new file mode 100644 index 000000000000..c5febc3d97b4 --- /dev/null +++ b/appendices/migration85/new-features.xml @@ -0,0 +1,298 @@ + + + New Features + + + PHP Core + + + Pipe Operator + + + Added the pipe (|>) operator. + + + + + + strlen(...); +print $result . PHP_EOL; // Prints "11" +]]> + + + + + + Closure in constant expressions + + + Added support for Closures and first class callables in constant + expressions. This includes: + + + Attribute parameters. + Default values of properties and parameters. + Constants and Class Constants. + + + + + + + + + #[\NoDiscard] attribute + + + Added the #[\NoDiscard] attribute to indicate that a function's return + value is important and should be consumed. + + + + + Also, added the (void) cast to indicate that not using a value is intentional. + The (void) cast has no effect on the program's execution by itself, but + it can be used to suppress warnings emitted by #[\NoDiscard] and possibly + also diagnostics emitted by external IDEs or static analysis tools. + + + + + + + + + + + + + Attributes on Constants + + + Added support for attributes on compile-time non-class constants. + + + + + The Deprecated attribute can now be used on constants. + + + + + + + <code>#[\DelayedTargetValidation]</code> attribute + + + The new #[\DelayedTargetValidation] attribute can be used to suppress + compile-time errors from core (or extension) attributes that are used on + invalid targets. These errors are instead reported at runtime if and when + ReflectionAttribute::newInstance() is called. + + + + + + + <code>#[\Override]</code> for properties + + + Override attribute can now be applied to properties. + + + + + + + Static Asymmetric Visibility + + + Added asymmetric visibility support for static properties. + + + + + + + Backtraces for Fatal Errors + + + Fatal Errors (such as an exceeded maximum execution time) now include a + backtrace. + + + + + + + Final property promotion + + + Constructor property promotion can now be used for final properties. + + + + + + + Casts in constant expressions + + + Added support for casts in constant expressions. + + + + + + + + + + + + + + cURL + + + Added support for share handles that are persisted across multiple PHP + requests, safely allowing for more effective connection reuse. + + + + + Added support for CURLINFO_USED_PROXY (libcurl >= 8.7.0), + CURLINFO_HTTPAUTH_USED, + and CURLINFO_PROXYAUTH_USED (libcurl >= 8.12.0) + to the curl_getinfo function. + When curl_getinfo returns an array, the same information + is available as "used_proxy", + "httpauth_used", and "proxyauth_used" + keys. + CURLINFO_USED_PROXY gets zero set if no proxy was used in the + previous transfer or a non-zero value if a proxy was used. + CURLINFO_HTTPAUTH_USED and + CURLINFO_PROXYAUTH_USED get bitmasks + indicating the HTTP and proxy authentication methods that were + used in the previous request. See CURLAUTH_* + constants for possible values. + + + + Added CURLOPT_INFILESIZE_LARGE Curl option, which is a safe + replacement for CURLOPT_INFILESIZE. On certain systems, + CURLOPT_INFILESIZE only accepts a 32-bit signed integer as the file + size (2.0 GiB) even on 64-bit systems. CURLOPT_INFILESIZE_LARGE + accepts the largest integer value the system can handle. + + + + Added CURLFOLLOW_OBEYCODE, CURLFOLLOW_FIRSTONLY + and CURLFOLLOW_ALL values for CURLOPT_FOLLOWLOCATION + curl_setopt option. + CURLFOLLOW_OBEYCODE to follow more strictly in regard to redirect + if they are allowed. CURLFOLLOW_FIRSTONLY to follow only the + first redirect thus if there is any follow up redirect, it won't go + any further. CURLFOLLOW_ALL is equivalent to setting + CURLOPT_FOLLOWLOCATION to true. + + + + Added support for CURLINFO_CONN_ID (libcurl >= 8.2.0) + to the curl_getinfo function. This constant allows retrieving + the unique ID of the connection used by a cURL transfer. It is primarily + useful when connection reuse or connection pooling logic is needed in + PHP-level applications. When curl_getinfo returns an array, + this value is available as the "conn_id" key. + + + + Added support for CURLINFO_CONN_ID (libcurl >= 8.2.0) + to the curl_getinfo. + + + + Added support for CURLINFO_QUEUE_TIME_T (libcurl >= 8.6.0) + to the curl_getinfo function. This constant allows + retrieving the time (in microseconds) that the request spent in libcurl’s + connection queue before it was sent. + This value can also be retrieved by passing CURLINFO_QUEUE_TIME_T to the + curl_getinfo option parameter. + + + + Added support for CURLOPT_SSL_SIGNATURE_ALGORITHMS to + specify the signature algorithms to use for TLS. + + + + + + DOM + + + Added Dom\Element::$outerHTML. + + + + Added $children property to Dom\ParentNode implementations. + + + + + + EXIF + + + Added OffsetTime* Exif tags. + + + + Added support for HEIF/HEIC. + + + + + + diff --git a/appendices/migration85/new-functions.xml b/appendices/migration85/new-functions.xml new file mode 100644 index 000000000000..f0b925767eeb --- /dev/null +++ b/appendices/migration85/new-functions.xml @@ -0,0 +1,151 @@ + + + New Functions + + + Core + + + + + get_error_handler + get_exception_handler + + Closure::getCurrent + + + + + + Curl + + + + curl_multi_get_handles + curl_multi_add_handle + curl_share_init_persistent + + + + + DOM + + + Dom\Element::getElementsByClassName + + + Dom\Element::insertAdjacentHTML + + + + + + Enchant + + enchant_dict_remove_from_session + enchant_dict_remove + + + + + Intl + + + Locale::isRightToLeft + + locale_is_right_to_left + + grapheme_levenshtein + + + + + Opcache + + + opcache_is_script_cached_in_file_cache + + + + + PDO_SQLITE + + + Pdo\Sqlite::setAuthorizer + + + + + + PGSQL + + + pg_close_stmt + pg_service + + + + + Reflection + + + + ReflectionConstant::getFileName + + + ReflectionConstant::getExtension + + + ReflectionConstant::getExtensionName + + + + ReflectionConstant::getAttributes + + + ReflectionProperty::getMangledName + + + + + + Sqlite + + + + Sqlite3Stmt::busy + + + + + + Standard + + + + array_first + array_last + + + + + From 6ebc73ae905ac301623da22b0d67e7ab0793b791 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Thu, 9 Oct 2025 05:50:35 +0900 Subject: [PATCH 02/36] [WIP] added many entries to new-features.xml --- appendices/migration85/new-features.xml | 152 +++++++++++++++++++++++- 1 file changed, 146 insertions(+), 6 deletions(-) diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index c5febc3d97b4..3b772614650b 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -105,7 +105,7 @@ $results = concat("a", "b"); The new #[\DelayedTargetValidation] attribute can be used to suppress compile-time errors from core (or extension) attributes that are used on invalid targets. These errors are instead reported at runtime if and when - ReflectionAttribute::newInstance() is called. + ReflectionAttribute::newInstance is called. @@ -125,7 +125,7 @@ $results = concat("a", "b"); Static Asymmetric Visibility - Added asymmetric visibility support for static properties. + Added asymmetric visibility support for static properties. @@ -146,7 +146,7 @@ $results = concat("a", "b"); Final property promotion - Constructor property promotion can now be used for final properties. + Constructor property promotion can now be used for final properties. @@ -163,7 +163,7 @@ $results = concat("a", "b"); @@ -253,11 +253,11 @@ print T1 . PHP_EOL; // Prints "0" DOM - Added Dom\Element::$outerHTML. + Added Dom\Element::$outerHTML. - Added $children property to Dom\ParentNode implementations. + Added $children property to Dom\ParentNode implementations. @@ -275,6 +275,146 @@ print T1 . PHP_EOL; // Prints "0" + + Intl + + + Added class constants NumberFormatter::CURRENCY_ISO, + NumberFormatter::CURRENCY_PLURAL, NumberFormatter::CASH_CURRENCY, + and NumberFormatter::CURRENCY_STANDARD for various currency-related + number formats. + + + + Added Locale::addLikelySubtags and Locale::minimizeSubtags to + handle likely tags on a given locale. + + + + Added IntlListFormatter class to format, order, and punctuate + a list of items with a given locale, IntlListFormatter::TYPE_AND, + IntlListFormatter::TYPE_OR, IntlListFormatter::TYPE_UNITS operands and + IntlListFormatter::WIDTH_WIDE, IntlListFormatter::WIDTH_SHORT and + IntlListFormatter::WIDTH_NARROW widths. + It is supported from icu 67. + + + + + + PDO_Sqlite + + + Added class constant Pdo_Sqlite::ATTR_BUSY_STATEMENT. + + + + Added class constants Pdo_Sqlite::ATTR_EXPLAIN_STATEMENT, + Pdo_Sqlite::EXPLAIN_MODE_PREPARED, Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN, + Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN. + + + + Added PDO\Sqlite::ATTR_TRANSACTION_MODE connection attribute with + possible values PDO\Sqlite::TRANSACTION_MODE_DEFERRED, + PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE, + and PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE, allowing to configure + the transaction mode to use when calling beginTransaction(). + + + + + + Session + + + session_set_cookie_params, + session_get_cookie_params, and session_start + now support partitioned cookies via the "partitioned" key. + + + + + + + SOAP + + + Enumeration cases are now dumped in __getTypes(). + + + + support for Soap 1.2 Reason Text xml:lang attribute. + + + + The signature of SoapFault::__construct and + SoapServer::fault therefore + now have an optional $lang parameter. + This support solves compatibility with .NET SOAP clients. + + + + + + Standard + + + mail now returns the actual sendmail error and detects if the sendmail + process was terminated unexpectedly. In such cases, a warning is emitted + and the function returns false. Previously, these errors were silently + ignored. This change affects only the sendmail transport. + + + + getimagesize now supports HEIF/HEIC images. + + + + getimagesize now supports SVG images when ext-libxml is also loaded. + Similarly, image_type_to_extension and + image_type_to_mime_type + now also handle IMAGETYPE_SVG. + + + + The array returned by getimagesize now has two additional entries: + "width_unit" and "height_unit" to indicate in which units the dimensions + are expressed. These units are px by default. They are not necessarily + the same (just to give one example: one may be cm and the other may be px). + + + + setcookie and setrawcookie now support the "partitioned" key. + + + + + + + XSL + + + The $namespace argument of XSLTProcessor::getParameter, + XSLTProcessor::setParameter and XSLTProcessor::removeParameter + now actually works instead of being treated as empty. + This only works if the $name argument does not use Clark notation + and is not a QName because in those cases the namespace is taken + from the namespace href or prefix respectively. + + + + + + Zlib + + + flock is now supported on zlib streams. Previously, this always + failed to perform any locking action. + + + + @@ -102,7 +102,7 @@ $results = concat("a", "b"); <code>#[\DelayedTargetValidation]</code> attribute - The new #[\DelayedTargetValidation] attribute can be used to suppress + The new DelayedTargetValidation attribute can be used to suppress compile-time errors from core (or extension) attributes that are used on invalid targets. These errors are instead reported at runtime if and when ReflectionAttribute::newInstance is called. @@ -125,7 +125,8 @@ $results = concat("a", "b"); Static Asymmetric Visibility - Added asymmetric visibility support for static properties. + Added asymmetric visibility + support for static properties. @@ -146,7 +147,8 @@ $results = concat("a", "b"); Final property promotion - Constructor property promotion can now be used for final properties. + Constructor property promotion + can now be used for final properties. @@ -257,7 +259,8 @@ print T1 . PHP_EOL; // Prints "0" - Added $children property to Dom\ParentNode implementations. + Added $children property to + Dom\ParentNode implementations. @@ -286,16 +289,18 @@ print T1 . PHP_EOL; // Prints "0" - Added Locale::addLikelySubtags and Locale::minimizeSubtags to - handle likely tags on a given locale. + Added Locale::addLikelySubtags and + Locale::minimizeSubtags to handle likely tags on a given locale. - Added IntlListFormatter class to format, order, and punctuate - a list of items with a given locale, IntlListFormatter::TYPE_AND, - IntlListFormatter::TYPE_OR, IntlListFormatter::TYPE_UNITS operands and - IntlListFormatter::WIDTH_WIDE, IntlListFormatter::WIDTH_SHORT and - IntlListFormatter::WIDTH_NARROW widths. + Added IntlListFormatter class to format, order, and punctuate + a list of items with a given locale, IntlListFormatter::TYPE_AND, + IntlListFormatter::TYPE_OR, + IntlListFormatter::TYPE_UNITS operands and + IntlListFormatter::WIDTH_WIDE, + IntlListFormatter::WIDTH_SHORT and + IntlListFormatter::WIDTH_NARROW widths. It is supported from icu 67. @@ -309,16 +314,17 @@ print T1 . PHP_EOL; // Prints "0" - Added class constants Pdo_Sqlite::ATTR_EXPLAIN_STATEMENT, - Pdo_Sqlite::EXPLAIN_MODE_PREPARED, Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN, - Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN. + Added class constants Pdo_Sqlite::ATTR_EXPLAIN_STATEMENT, + Pdo_Sqlite::EXPLAIN_MODE_PREPARED, + Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN, + Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN. - Added PDO\Sqlite::ATTR_TRANSACTION_MODE connection attribute with - possible values PDO\Sqlite::TRANSACTION_MODE_DEFERRED, - PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE, - and PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE, allowing to configure + Added PDO\Sqlite::ATTR_TRANSACTION_MODE connection attribute with + possible values PDO\Sqlite::TRANSACTION_MODE_DEFERRED, + PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE, + and PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE, allowing to configure the transaction mode to use when calling beginTransaction(). @@ -330,7 +336,7 @@ print T1 . PHP_EOL; // Prints "0" session_set_cookie_params, session_get_cookie_params, and session_start - now support partitioned cookies via the "partitioned" key. + now support partitioned cookies via the "partitioned" key. @@ -340,17 +346,17 @@ print T1 . PHP_EOL; // Prints "0" SOAP - Enumeration cases are now dumped in __getTypes(). + Enumeration cases are now dumped in SoapClient::__getTypes. - support for Soap 1.2 Reason Text xml:lang attribute. + Added support for Soap 1.2 Reason Text xml:lang attribute. The signature of SoapFault::__construct and SoapServer::fault therefore - now have an optional $lang parameter. + now have an optional $lang parameter. This support solves compatibility with .NET SOAP clients. @@ -379,13 +385,14 @@ print T1 . PHP_EOL; // Prints "0" The array returned by getimagesize now has two additional entries: - "width_unit" and "height_unit" to indicate in which units the dimensions - are expressed. These units are px by default. They are not necessarily - the same (just to give one example: one may be cm and the other may be px). + "width_unit" and "height_unit" to indicate in + which units the dimensions are expressed. These units are px by default. They are not + necessarily the same (just to give one example: one may be cm and the other may be px). - setcookie and setrawcookie now support the "partitioned" key. + setcookie and setrawcookie now support the + "partitioned" key. @@ -396,8 +403,9 @@ print T1 . PHP_EOL; // Prints "0" The $namespace argument of XSLTProcessor::getParameter, - XSLTProcessor::setParameter and XSLTProcessor::removeParameter - now actually works instead of being treated as empty. + XSLTProcessor::setParameter and + XSLTProcessor::removeParameter now actually works instead of + being treated as empty. This only works if the $name argument does not use Clark notation and is not a QName because in those cases the namespace is taken from the namespace href or prefix respectively. From 2bda1b8155a766de4f4a28c511ea28495f25c911 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Thu, 9 Oct 2025 22:37:41 +0900 Subject: [PATCH 04/36] added windows-support.xml --- appendices/migration85.xml | 2 +- appendices/migration85/windows-support.xml | 92 ++++++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 appendices/migration85/windows-support.xml diff --git a/appendices/migration85.xml b/appendices/migration85.xml index 9de7f6d2ae10..917a750d426b 100644 --- a/appendices/migration85.xml +++ b/appendices/migration85.xml @@ -28,10 +28,10 @@ &appendices.migration85.new-functions; &appendices.migration85.constants; &appendices.migration85.incompatible; + &appendices.migration85.windows-support; diff --git a/appendices/migration85/windows-support.xml b/appendices/migration85/windows-support.xml new file mode 100644 index 000000000000..748a8bbcef5a --- /dev/null +++ b/appendices/migration85/windows-support.xml @@ -0,0 +1,92 @@ + + + Windows Support + + + Core + + + The configuration variables PHP_VERSION, + PHP_MINOR_VERSION, and + PHP_RELEASE_VERSION are now always numbers. + Previously, they have been strings for buildconf builds. + + + + phpize builds now reflect the source tree in the + build dir (as it already worked for in-tree builds); some extension + builds (especially when using Makefile.frag.w32) may need adjustments. + + + + is now supported + for MSVC builds. This enables ASan and debug assertions, and is supported + as of MSVC 16.10 and Windows 10. + + + + The configuration + option for clang builds is no longer supported. Select warnings to suppress + via CFLAGS instead. + + + + + + COM + + + The extension is now build shared by default; previously it defaulted to a + static extension, although the official Windows binaries built a shared + extension. + + + + + + FFI + + + It is no longer necessary to specify the library when using + FFI::cdef and FFI::load. + However, this convenience feature should not be used in production. + + + + + + Streams + + + If only pipe streams are contained in the $read + array, and the $write and $except + arrays are empty, stream_select now behaves + similar to POSIX systems, i.e. the function only returns if at least one + pipe is ready to be read, or after the timeout expires. + Previously, stream_select returned immediately, + reporting all streams as ready to read. + + + + + + From f5563f835e5d11c7fd30607cfec2b685b475efad Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Thu, 9 Oct 2025 23:00:58 +0900 Subject: [PATCH 05/36] [new-features.xml] added code comment --- appendices/migration85/new-features.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index 4967910f31bc..6479f53873be 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -165,7 +165,7 @@ $results = concat("a", "b"); From 53691edec4583e68490bb97ba6dde2a75a929be9 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 11 Oct 2025 00:40:14 +0900 Subject: [PATCH 06/36] [incompatible.xml] added more details --- appendices/migration85/incompatible.xml | 386 +++++++++++++++++++++++- 1 file changed, 380 insertions(+), 6 deletions(-) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 89ada23ff770..aa84e226cc48 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -20,16 +20,390 @@ Loosely comparing uncomparable objects - Loosely comparing uncomparable objects (e.g. enums, \CurlHandle and other - internal classes) to booleans was previously inconsistent. If compared to a - boolean literal $object == true, it would behave the same way as (bool) - $object. If compared to a statically unknown value $object == $true, it - would always return false. This behavior was consolidated to always follow - the behavior of (bool) $object. + Loosely comparing uncomparable objects (e.g. enums, + CurlHandle and other internal classes) to booleans + was previously inconsistent. If compared to a boolean literal + $object == true, it would behave the same way as + (bool)$object. If compared to a statically unknown value + $object == $true, it + would always return &false;. This behavior was consolidated to always + follow the behavior of (bool)$object. + + gc_collect_cycles + + + The return value of gc_collect_cycles no longer includes + strings and resources that were indirectly collected through cycles. + + + + + + Substitute static keyword in final subclass + + + It is now allowed to substitute static with self or the concrete class name + in final subclasses. + + + + + + Tick handlers + + + The tick handlers are now deactivated after all shutdown functions, + destructors have run and the output handlers have been cleaned up. + + + + + + Trait binding + + + Traits are now bound before the parent class. This is a subtle behavioral + change, but should more closely match user expectations. + + + + + + Errors during compilation and class linking + + + Errors emitted during compilation and class linking are now always delayed + and handled after compilation or class linking. Fatal errors emitted during + compilation or class linking cause any delayed errors to be handled + immediately, without calling user-defined error handlers. + + + + + + Exceptions thrown by user-defined error handler + + + Exceptions thrown by user-defined error handlers when handling class linking + errors are not promoted to fatal errors anymore and do not prevent linking. + + + + + + Attribute error during compilation + + + Applying #[\Attribute] to an abstract class, enum, interface, or trait + triggers an error during compilation. Previously, the attribute could be + added, but when ReflectionAttribute::newInstance + was called an error would be thrown. + The error can be delayed from compilation to runtime using the new + #[\DelayedTargetValidation] attribute. + + + + + + disable_classes INI setting + + + The disable_classes INI setting has been removed as it causes various + engine assumptions to be broken. + + + + + + + Destructing non-array values + + + Destructing non-array values (other than NULL) using [] or list() now + emits a warning. + + + + + + + Warning related to cast + + + A warning is now emitted when casting floats (or strings that look like + floats) to int if they cannot be represented as one. This affects explicit + int casts and implicit int casts. + + + + + A warning is now emitted when casting NAN to other types. + + + + + + + + + Bzip2 + + + bzcompress now throws a ValueError + when $block_size is not between 1 and 9. + + + + bzcompress now throws a ValueError + when $work_factor is not between 0 and 250. + + + + + + DOM + + + Cloning a DOMNamedNodeMap, DOMNodeList, + Dom\NamedNodeMap, Dom\NodeList, + Dom\HTMLCollection, and Dom\DtdNamedNodeMap + now fails. + This never actually resulted in a working object, so the impact should + actually be zero. + + + + + + FileInfo + + + finfo_file and finfo::file + now throws a ValueError instead of a + TypeError when $filename + contains nul bytes. + This aligns the type of Error thrown to be consistent with the rest of + the language. + + + + + + Intl + + + The extension now requires at least ICU 57.1. + + + + The behaviour of Collator::SORT_REGULAR with respect to + handling numeric strings is now aligned with the behaviour of + SORT_REGULAR in ext/standard. + + + + + + LDAP + + + ldap_get_option and ldap_set_option + now throw a ValueError when passing an invalid option. + + + + + + MBString + + + Unicode data tables have been updated to Unicode 17.0 + + + + + + MySQLi + + + Calling the mysqli constructor on an already-constructed object + is now no longer possible and throws an Error. + + + + + + ODBC + + + ODBC now assumes that at least ODBC 3.5 functionality is available. The + ODBCVER definition and build system flags to control it have been removed. + + + + ODBC no longer has build flags to build against specific drivers (except + for DB2) and removes special cases for those drivers. It is strongly + recommended to use a driver manager like iODBC or unixODBC on non-Windows. + + + + + + Opcache + + + The Opcache extension is now always built into the PHP binary and is always + loaded. The INI directives opcache.enable + and opcache.enable_cli are still + honored. + + + + The / + configure flags have been removed, + and the build does not produce opcache.so or php_opcache.dll objects + anymore. + + + + Using zend_extension=opcache.so or zend_extension=php_opcache.dll INI + directives will emit a warning. + + + + + + PCNTL + + + pcntl_exec now throws ValueError + when entries of the $args parameter contain null bytes. + + + + pcntl_exec now throws ValueError + when entries or keys of the $env_vars parameter + contain null bytes. + + + + + + PCRE + + + The extension is compiled without semi-deprecated + PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK compile option. + + + + + + + PDO + + + The constructor arguments set in conjunction with PDO::FETCH_CLASS + now follow the usual CUFA (call_user_func_array) semantics. + This means string keys will act like a named argument. + Moreover, automatic wrapping for by-value arguments passed to a by-ref + parameter has been removed, and the usual E_WARNING about this is now + emitted. + To pass a variable by-ref to a constructor argument use the general + array value reference assignment: $ctor_args = [&$valByRef] + + + + Attempting to call PDOStatement::setFetchMode during + a call to PDO::fetch, + PDO::fetchObject, + PDO::fetchAll, for example using tricks such as + passing the statement object as a constructor argument when fetching into an + object, will now throw an Error. + + + + The value of the constants PDO::FETCH_GROUP, + PDO::FETCH_UNIQUE, + PDO::FETCH_CLASSTYPE, + PDO::FETCH_PROPS_LATE, and + PDO::FETCH_SERIALIZE have changed. + + + + A ValueError is now thrown if + PDO::FETCH_PROPS_LATE is used with a fetch mode different than + PDO::FETCH_CLASS, consistent with other fetch flags. + + + + A ValueError is now thrown if PDO::FETCH_INTO is used as a fetch mode in + PDO::fetchAll, similar to PDO::FETCH_LAZY. + + + + + + PDO_FIREBIRD + + + A ValueError is now thrown when trying to set a cursor + name that is too long on a PDOStatement resulting from + the Firebird driver. + + + + + + Session + + + Attempting to write session data where $_SESSION has a key containing + the pipe character will now emit a warning instead of silently failing. + + + + + + SimpleXML + + + Passing an XPath expression that returns something other than a node set + to SimpleXMLElement::xpath will now emit a warning + and return &false;, instead of silently failing and returning an empty array. + + + + + + SPL + + + ArrayObject no longer accepts enums, as modifying the + $name or $value properties can break + engine assumptions. + + + + SplFileObject::fwrite's parameter $length + is now nullable. The default value changed from 0 to &null;. + + + + + + Standard + + + Using a printf-family function with a formatter that did not specify the + precision previously incorrectly reset the precision instead of treating + it as a precision of 0. + + From 1821c081502546cbbcb83ae20f848b94b9d981ad Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 11 Oct 2025 00:42:28 +0900 Subject: [PATCH 07/36] fixed trailing whitespace --- appendices/migration85/incompatible.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index aa84e226cc48..d70fa2ee0b17 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -286,7 +286,7 @@ pcntl_exec now throws ValueError - when entries or keys of the $env_vars parameter + when entries or keys of the $env_vars parameter contain null bytes. From 999de6764248c3cf78d4c8ab32b18890c9632b35 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 12 Oct 2025 14:35:49 +0900 Subject: [PATCH 08/36] line length fix. --- appendices/migration85/incompatible.xml | 71 +++++++------ appendices/migration85/new-features.xml | 113 ++++++++++++--------- appendices/migration85/windows-support.xml | 15 +-- 3 files changed, 110 insertions(+), 89 deletions(-) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index d70fa2ee0b17..c5a365ac0f4f 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -25,15 +25,15 @@ was previously inconsistent. If compared to a boolean literal $object == true, it would behave the same way as (bool)$object. If compared to a statically unknown value - $object == $true, it - would always return &false;. This behavior was consolidated to always - follow the behavior of (bool)$object. + $object == $true, it would always return &false;. + This behavior was consolidated to always follow the behavior of + (bool)$object. - gc_collect_cycles + Return value of gc_collect_cycles The return value of gc_collect_cycles no longer includes @@ -63,11 +63,12 @@ - Trait binding + Traits binding Traits are now bound before the parent class. This is a subtle behavioral change, but should more closely match user expectations. + @@ -95,7 +96,7 @@ - Attribute error during compilation + Attribute apply error during compilation Applying #[\Attribute] to an abstract class, enum, interface, or trait @@ -131,7 +132,7 @@ - Warning related to cast + Warnings related to cast A warning is now emitted when casting floats (or strings that look like @@ -168,10 +169,10 @@ DOM - Cloning a DOMNamedNodeMap, DOMNodeList, - Dom\NamedNodeMap, Dom\NodeList, - Dom\HTMLCollection, and Dom\DtdNamedNodeMap - now fails. + Cloning a DOMNamedNodeMap, + DOMNodeList, Dom\NamedNodeMap, + Dom\NodeList, Dom\HTMLCollection, + and Dom\DtdNamedNodeMap now fails. This never actually resulted in a working object, so the impact should actually be zero. @@ -240,8 +241,8 @@ ODBC - ODBC now assumes that at least ODBC 3.5 functionality is available. The - ODBCVER definition and build system flags to control it have been removed. + ODBC now assumes that at least ODBC 3.5 functionality is available. + The ODBCVER definition and build system flags to control it have been removed. @@ -257,21 +258,22 @@ The Opcache extension is now always built into the PHP binary and is always - loaded. The INI directives opcache.enable + loaded. + The INI directives opcache.enable and opcache.enable_cli are still honored. - The / - configure flags have been removed, - and the build does not produce opcache.so or php_opcache.dll objects - anymore. + The / + configure flags have been removed, and the build does not produce opcache.so + or php_opcache.dll objects anymore. - Using zend_extension=opcache.so or zend_extension=php_opcache.dll INI - directives will emit a warning. + Using zend_extension=opcache.so or + zend_extension=php_opcache.dll INI directives + will emit a warning. @@ -307,12 +309,12 @@ PDO - The constructor arguments set in conjunction with PDO::FETCH_CLASS - now follow the usual CUFA (call_user_func_array) semantics. + The constructor arguments set in conjunction with + PDO::FETCH_CLASS now follow the usual CUFA + (call_user_func_array) semantics. This means string keys will act like a named argument. Moreover, automatic wrapping for by-value arguments passed to a by-ref - parameter has been removed, and the usual E_WARNING about this is now - emitted. + parameter has been removed, and the usual E_WARNING about this is now emitted. To pass a variable by-ref to a constructor argument use the general array value reference assignment: $ctor_args = [&$valByRef] @@ -336,13 +338,16 @@ A ValueError is now thrown if - PDO::FETCH_PROPS_LATE is used with a fetch mode different than - PDO::FETCH_CLASS, consistent with other fetch flags. + PDO::FETCH_PROPS_LATE is used with a fetch mode + different than PDO::FETCH_CLASS, consistent with + other fetch flags. - A ValueError is now thrown if PDO::FETCH_INTO is used as a fetch mode in - PDO::fetchAll, similar to PDO::FETCH_LAZY. + A ValueError is now thrown if + PDO::FETCH_INTO is used as a fetch mode in + PDO::fetchAll, + similar to PDO::FETCH_LAZY. @@ -362,8 +367,9 @@ Session - Attempting to write session data where $_SESSION has a key containing - the pipe character will now emit a warning instead of silently failing. + Attempting to write session data where $_SESSION has a key + containing the pipe character will now emit a warning instead of silently + failing. @@ -389,8 +395,9 @@ - SplFileObject::fwrite's parameter $length - is now nullable. The default value changed from 0 to &null;. + SplFileObject::fwrite's parameter + $length is now nullable. + The default value changed from 0 to &null;. diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index 6479f53873be..b1f9ca02d7ca 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -9,7 +9,8 @@ Pipe Operator - Added the pipe (|>) operator. + Added the pipe + (|>) operator. @@ -46,8 +47,8 @@ print $result . PHP_EOL; // Prints "11" #[\NoDiscard] attribute - Added the NoDiscard attribute to indicate that a function's return - value is important and should be consumed. + Added the NoDiscard attribute to indicate that a + function's return value is important and should be consumed. @@ -69,7 +70,8 @@ function concat(string $a, string $b): string { return a + b; } -// Warning: The return value of function concat() should either be used or intentionally ignored by casting it as (void) in xxx.php +// Warning: The return value of function concat() should either be used or +// intentionally ignored by casting it as (void) in xxx.php concat("a", "b"); // No warning, because the return value is consumed by the assignment. @@ -102,10 +104,10 @@ $results = concat("a", "b"); <code>#[\DelayedTargetValidation]</code> attribute - The new DelayedTargetValidation attribute can be used to suppress - compile-time errors from core (or extension) attributes that are used on - invalid targets. These errors are instead reported at runtime if and when - ReflectionAttribute::newInstance is called. + The new DelayedTargetValidation attribute can be used + to suppress compile-time errors from core (or extension) attributes that are + used on invalid targets. These errors are instead reported at runtime if and + when ReflectionAttribute::newInstance is called. @@ -125,8 +127,8 @@ $results = concat("a", "b"); Static Asymmetric Visibility - Added asymmetric visibility - support for static properties. + Added asymmetric + visibility support for static properties. @@ -144,11 +146,11 @@ $results = concat("a", "b"); - Final property promotion + Constructor promotion for final property - Constructor property promotion - can now be used for final properties. + Constructor + property promotion can now be used for final properties. @@ -198,26 +200,30 @@ print T1 . PHP_EOL; // Prints "0" CURLINFO_HTTPAUTH_USED and CURLINFO_PROXYAUTH_USED get bitmasks indicating the HTTP and proxy authentication methods that were - used in the previous request. See CURLAUTH_* - constants for possible values. + used in the previous request. + See CURLAUTH_* constants for + possible values. Added CURLOPT_INFILESIZE_LARGE Curl option, which is a safe replacement for CURLOPT_INFILESIZE. On certain systems, - CURLOPT_INFILESIZE only accepts a 32-bit signed integer as the file - size (2.0 GiB) even on 64-bit systems. CURLOPT_INFILESIZE_LARGE - accepts the largest integer value the system can handle. + CURLOPT_INFILESIZE only accepts a 32-bit signed integer as + the file size (2.0 GiB) even on 64-bit systems. + CURLOPT_INFILESIZE_LARGE accepts the largest integer value + the system can handle. - Added CURLFOLLOW_OBEYCODE, CURLFOLLOW_FIRSTONLY - and CURLFOLLOW_ALL values for CURLOPT_FOLLOWLOCATION + Added CURLFOLLOW_OBEYCODE, + CURLFOLLOW_FIRSTONLY and CURLFOLLOW_ALL + values for CURLOPT_FOLLOWLOCATION curl_setopt option. - CURLFOLLOW_OBEYCODE to follow more strictly in regard to redirect - if they are allowed. CURLFOLLOW_FIRSTONLY to follow only the - first redirect thus if there is any follow up redirect, it won't go - any further. CURLFOLLOW_ALL is equivalent to setting + CURLFOLLOW_OBEYCODE to follow more strictly in regard to + redirect if they are allowed. + CURLFOLLOW_FIRSTONLY to follow only the first redirect thus + if there is any follow up redirect, it won't go any further. + CURLFOLLOW_ALL is equivalent to setting CURLOPT_FOLLOWLOCATION to true. @@ -240,8 +246,9 @@ print T1 . PHP_EOL; // Prints "0" to the curl_getinfo function. This constant allows retrieving the time (in microseconds) that the request spent in libcurl’s connection queue before it was sent. - This value can also be retrieved by passing CURLINFO_QUEUE_TIME_T to the - curl_getinfo option parameter. + This value can also be retrieved by passing + CURLINFO_QUEUE_TIME_T to the curl_getinfo + option parameter. @@ -283,19 +290,22 @@ print T1 . PHP_EOL; // Prints "0" Added class constants NumberFormatter::CURRENCY_ISO, - NumberFormatter::CURRENCY_PLURAL, NumberFormatter::CASH_CURRENCY, - and NumberFormatter::CURRENCY_STANDARD for various currency-related - number formats. + NumberFormatter::CURRENCY_PLURAL, + NumberFormatter::CASH_CURRENCY, + and NumberFormatter::CURRENCY_STANDARD + for various currency-related number formats. Added Locale::addLikelySubtags and - Locale::minimizeSubtags to handle likely tags on a given locale. + Locale::minimizeSubtags to handle likely tags + on a given locale. - Added IntlListFormatter class to format, order, and punctuate - a list of items with a given locale, IntlListFormatter::TYPE_AND, + Added IntlListFormatter class to format, order, + and punctuate a list of items with a given locale, + IntlListFormatter::TYPE_AND, IntlListFormatter::TYPE_OR, IntlListFormatter::TYPE_UNITS operands and IntlListFormatter::WIDTH_WIDE, @@ -321,11 +331,11 @@ print T1 . PHP_EOL; // Prints "0" - Added PDO\Sqlite::ATTR_TRANSACTION_MODE connection attribute with - possible values PDO\Sqlite::TRANSACTION_MODE_DEFERRED, + Added PDO\Sqlite::ATTR_TRANSACTION_MODE connection attribute + with possible values PDO\Sqlite::TRANSACTION_MODE_DEFERRED, PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE, - and PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE, allowing to configure - the transaction mode to use when calling beginTransaction(). + and PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE, + allowing to configure the transaction mode to use when calling beginTransaction(). @@ -335,8 +345,9 @@ print T1 . PHP_EOL; // Prints "0" session_set_cookie_params, - session_get_cookie_params, and session_start - now support partitioned cookies via the "partitioned" key. + session_get_cookie_params, + and session_start now support partitioned cookies via the + "partitioned" key. @@ -366,10 +377,11 @@ print T1 . PHP_EOL; // Prints "0" Standard - mail now returns the actual sendmail error and detects if the sendmail - process was terminated unexpectedly. In such cases, a warning is emitted - and the function returns false. Previously, these errors were silently - ignored. This change affects only the sendmail transport. + mail now returns the actual sendmail error and detects + if the sendmail process was terminated unexpectedly. + In such cases, a warning is emitted and the function returns false. + Previously, these errors were silently ignored. + This change affects only the sendmail transport. @@ -377,7 +389,8 @@ print T1 . PHP_EOL; // Prints "0" - getimagesize now supports SVG images when ext-libxml is also loaded. + getimagesize now supports SVG images when ext-libxml + is also loaded. Similarly, image_type_to_extension and image_type_to_mime_type now also handle IMAGETYPE_SVG. @@ -404,11 +417,11 @@ print T1 . PHP_EOL; // Prints "0" The $namespace argument of XSLTProcessor::getParameter, XSLTProcessor::setParameter and - XSLTProcessor::removeParameter now actually works instead of - being treated as empty. - This only works if the $name argument does not use Clark notation - and is not a QName because in those cases the namespace is taken - from the namespace href or prefix respectively. + XSLTProcessor::removeParameter now actually works + instead of being treated as empty. + This only works if the $name argument does not use Clark notation and is not a + QName because in those cases the namespace is taken from the namespace href or + prefix respectively. @@ -417,8 +430,8 @@ print T1 . PHP_EOL; // Prints "0" Zlib - flock is now supported on zlib streams. Previously, this always - failed to perform any locking action. + flock is now supported on zlib streams. Previously, + this always failed to perform any locking action. diff --git a/appendices/migration85/windows-support.xml b/appendices/migration85/windows-support.xml index 748a8bbcef5a..b84f24312c7f 100644 --- a/appendices/migration85/windows-support.xml +++ b/appendices/migration85/windows-support.xml @@ -25,9 +25,9 @@ - The configuration - option for clang builds is no longer supported. Select warnings to suppress - via CFLAGS instead. + The + configuration option for clang builds is no longer supported. + Select warnings to suppress via CFLAGS instead. @@ -59,10 +59,11 @@ If only pipe streams are contained in the $read - array, and the $write and $except - arrays are empty, stream_select now behaves - similar to POSIX systems, i.e. the function only returns if at least one - pipe is ready to be read, or after the timeout expires. + array, and the $write and + $except arrays are empty, + stream_select now behaves similar to POSIX systems, + i.e. the function only returns if at least one pipe is ready to be read, + or after the timeout expires. Previously, stream_select returned immediately, reporting all streams as ready to read. From 8d58d7ebf0ae2220eb2744aa7e939b26813b3151 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 12 Oct 2025 14:36:09 +0900 Subject: [PATCH 09/36] added deprecated.xml --- appendices/migration85/deprecated.xml | 544 ++++++++++++++++++++++++++ 1 file changed, 544 insertions(+) create mode 100644 appendices/migration85/deprecated.xml diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml new file mode 100644 index 000000000000..d77035864bec --- /dev/null +++ b/appendices/migration85/deprecated.xml @@ -0,0 +1,544 @@ + + + Deprecated Features + + + PHP Core + + + Changes to user output handler + + + + Returning a non-string from a user output handler is deprecated. The + deprecation warning will bypass the handler with the bad return to ensure + it is visible; if there are nested output handlers the next one will still + be used. + + + + Trying to produce output (e.g. with echo) within + a user output handler is deprecated. + The deprecation warning will bypass the handler producing the output to + ensure it is visible; if there are nested output handlers the next + one will still be used. If a user output handler returns a non-string and + produces output, the warning about producing an output is emitted first. + + + + + + Non-canonical cast names + + + + Non-canonical cast names (boolean), + (integer), (double), + and (binary) have been deprecated, + use (bool), (int), + (float), and (string) respectively. + + + + + + Terminating case statements with a semicolon + + + + Terminating case statements with a semicolon instead of a colon has + been deprecated. + + + + + + The backtick operator + + + + The backtick operator + as an alias for shell_exec has been deprecated. + + + + + + Returning null from __debugInfo() + + + + Returning &null; from + __debugInfo() + has been deprecated. Return an empty array instead. + + + + + + report_memleaks INI directive + + + + The report_memleaks INI directive + has been deprecated. + + + + + + Constant redeclaration + + + + Constant redeclaration has been deprecated. + + + + + + Closure binding issues + + + + The following closure binding issues, which already emit an + E_WARNING, are now deprecated: + + + Binding an instance to a static closure. + Binding methods to objects that are not instances of the class + (or subclass) that the method is defined. + Unbinding $this from a method. + Unbinding $this from a closure that uses `$this`. + Binding a closure to the scope of an internal class. + Rebinding the scope of a closure created from a function or method. + + + + + + + __sleep() and __wakeup() magic methods + + + + + The __sleep() and + __wakeup() magic methods + have been soft-deprecated. + The __serialize() and + __unserialize() magic + methods should be used instead, or at the same time if compatibility + with PHP 7 is required. + + + + + + Using null as an array offset + + + + Using null as an array offset or when calling array_key_exists + is now deprecated. Instead an empty string should be used. + + + + + + Incrementing non-numeric strings + + + + Incrementing non-numeric strings is now deprecated. + Instead the str_increment function should be used. + + + + + + register_argc_argv INI directive + + + + Deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string for + non-CLI SAPIs has been deprecated. + Configure register_argc_argv=0 and switch to either $_GET or + $_SERVER['QUERY_STRING'] to access the information, after verifying + that the usage is safe. + + + + + + + + cURL + + + The curl_close function has been deprecated, + as CurlHandle objects are freed automatically. + + + + + The curl_share_close function has been deprecated, + as CurlShareHandle objects are freed automatically. + + + + + + + Date + + + The DATE_RFC7231 and + DateTimeInterface::RFC7231 constants have been deprecated. + This is because the associated timezone is ignored and always uses GMT. + + + + + The __wakeup() magic method of + DateTimeInterface, + DateTime, DateTimeImmutable, + DateTimeZone, DateInterval, + and DatePeriod has been deprecated in favour of + the __unserialize() magic method. + + + + + + + + + FileInfo + + + The finfo_close function has been deprecated. + As finfo objects are freed automatically. + + + + + The $context parameter of the + finfo_buffer function has been deprecated + as it is ignored. + + + + + + + GD + + + The imagedestroy function has been deprecated, + as GdImage objects are freed automatically. + + + + + + + Hash + + + The MHASH_* constants + have been deprecated. These have been overlooked when the mhash*() function + family has been deprecated per + + + + + + + Intl + + + The intl.error_level INI setting + has been deprecated. + Errors should either be checked manually or exceptions should be enabled by + using the intl.use_exceptions + INI setting. + + + + + + + LDAP + + + Specific Oracle Instant Client calls and constants have been deprecated. + + List of affected calls: + + ldap_connect with wallet support + ldap_connect_wallet + + + List of affected constants: + + GSLC_SSL_NO_UATH + GSLC_SSL_ONEWAY_UATH + GSLC_SSL_TWOWAY_UATH + + + + + + + + MySQLi + + + The mysqli_execute alias function has been deprecated. + Use mysqli_stmt_execute instead. + + + + + + + OpenSSL + + + The $key_length parameter for + openssl_pkey_derive has been deprecated. + This is because it is either ignored, or truncates the key, which can be + a vulnerability. + + + + + + + PDO + + + The "uri:" DSN scheme has been deprecated due to security concerns with + DSNs coming from remote URIs. + + + + + Driver specific constants in the PDO class have been deprecated. + List of affected constants and their replacement: + + + PDO::DBLIB_ATTR_CONNECTION_TIMEOUT => Pdo\Dblib::ATTR_CONNECTION_TIMEOUT + PDO::DBLIB_ATTR_QUERY_TIMEOUT => Pdo\Dblib::ATTR_QUERY_TIMEOUT + PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER => Pdo\Dblib::ATTR_STRINGIFY_UNIQUEIDENTIFIER + PDO::DBLIB_ATTR_VERSION => Pdo\Dblib::ATTR_VERSION + PDO::DBLIB_ATTR_TDS_VERSION => Pdo\Dblib::ATTR_TDS_VERSION + PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS => Pdo\Dblib::ATTR_SKIP_EMPTY_ROWSETS + PDO::DBLIB_ATTR_DATETIME_CONVERT => Pdo\Dblib::ATTR_DATETIME_CONVERT + PDO::FB_ATTR_DATE_FORMAT => Pdo\Firebird::ATTR_DATE_FORMAT + PDO::FB_ATTR_TIME_FORMAT => Pdo\Firebird::ATTR_TIME_FORMAT + PDO::FB_ATTR_TIMESTAMP_FORMAT => Pdo\Firebird::ATTR_TIMESTAMP_FORMAT + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => Pdo\Mysql::ATTR_USE_BUFFERED_QUERY + PDO::MYSQL_ATTR_LOCAL_INFILE => Pdo\Mysql::ATTR_LOCAL_INFILE + PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY => Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY + PDO::MYSQL_ATTR_INIT_COMMAND => Pdo\Mysql::ATTR_INIT_COMMAND + PDO::MYSQL_ATTR_MAX_BUFFER_SIZE => Pdo\Mysql::ATTR_MAX_BUFFER_SIZE + PDO::MYSQL_ATTR_READ_DEFAULT_FILE => Pdo\Mysql::ATTR_READ_DEFAULT_FILE + PDO::MYSQL_ATTR_READ_DEFAULT_GROUP => Pdo\Mysql::ATTR_READ_DEFAULT_GROUP + PDO::MYSQL_ATTR_COMPRESS => Pdo\Mysql::ATTR_COMPRESS + PDO::MYSQL_ATTR_DIRECT_QUERY => Pdo\Mysql::ATTR_DIRECT_QUERY + PDO::MYSQL_ATTR_FOUND_ROWS => Pdo\Mysql::ATTR_FOUND_ROWS + PDO::MYSQL_ATTR_IGNORE_SPACE => Pdo\Mysql::ATTR_IGNORE_SPACE + PDO::MYSQL_ATTR_SSL_KEY => Pdo\Mysql::ATTR_SSL_KEY + PDO::MYSQL_ATTR_SSL_CERT => Pdo\Mysql::ATTR_SSL_CERT + PDO::MYSQL_ATTR_SSL_CA => Pdo\Mysql::ATTR_SSL_CA + PDO::MYSQL_ATTR_SSL_CAPATH => Pdo\Mysql::ATTR_SSL_CAPATH + PDO::MYSQL_ATTR_SSL_CIPHER => Pdo\Mysql::ATTR_SSL_CIPHER + PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT + PDO::MYSQL_ATTR_SERVER_PUBLIC_KEY => Pdo\Mysql::ATTR_SERVER_PUBLIC_KEY + PDO::MYSQL_ATTR_MULTI_STATEMENTS => Pdo\Mysql::ATTR_MULTI_STATEMENTS + PDO::ODBC_ATTR_USE_CURSOR_LIBRARY => Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY + PDO::ODBC_ATTR_ASSUME_UTF8 => Pdo\Odbc::ATTR_ASSUME_UTF8 + PDO::ODBC_SQL_USE_IF_NEEDED => Pdo\Odbc::SQL_USE_IF_NEEDED + PDO::ODBC_SQL_USE_DRIVER => Pdo\Odbc::SQL_USE_DRIVER + PDO::ODBC_SQL_USE_ODBC => Pdo\Odbc::SQL_USE_ODBC + PDO::PGSQL_ATTR_DISABLE_PREPARES => Pdo\Pgsql::ATTR_DISABLE_PREPARES + PDO::SQLITE_ATTR_EXTENDED_RESULT_CODES => Pdo\Sqlite::ATTR_EXTENDED_RESULT_CODES + PDO::SQLITE_ATTR_OPEN_FLAGS => Pdo\Sqlite::OPEN_FLAGS + PDO::SQLITE_ATTR_READONLY_STATEMENT => Pdo\Sqlite::ATTR_READONLY_STATEMENT + PDO::SQLITE_DETERMINISTIC => Pdo\Sqlite::DETERMINISTIC + PDO::SQLITE_OPEN_READONLY => Pdo\Sqlite::OPEN_READONLY + PDO::SQLITE_OPEN_READWRITE => Pdo\Sqlite::OPEN_READWRITE + PDO::SQLITE_OPEN_CREATE => Pdo\Sqlite::OPEN_CREATE + + + + + + Driver specific methods in the PDO class have been deprecated. + List of affected methods and their replacement: + + + PDO::pgsqlCopyFromArray => Pdo\Pgsql::copyFromArray + PDO::pgsqlCopyFromFile => Pdo\Pgsql::copyFromFile + PDO::pgsqlCopyToArray => Pdo\Pgsql::copyToArray + PDO::pgsqlCopyToFile => Pdo\Pgsql::copyToFile + PDO::pgsqlGetNotify => Pdo\Pgsql::getNotify + PDO::pgsqlGetPid => Pdo\Pgsql::getPid + PDO::pgsqlLOBCreate => Pdo\Pgsql::lobCreate + PDO::pgsqlLOBOpen => Pdo\Pgsql::lobOpen + PDO::pgsqlLOBUnlink => Pdo\Pgsql::lobUnlink + PDO::sqliteCreateAggregate => Pdo\Sqlite::createAggregate + PDO::sqliteCreateCollation => Pdo\Sqlite::createCollation + PDO::sqliteCreateFunction => Pdo\Sqlite::createFunction + + + + + + + + PDO_PGSQL + + + Constants related to transaction states have been deprecated: + + + PDO::PGSQL_TRANSACTION_IDLE + PDO::PGSQL_TRANSACTION_ACTIVE + PDO::PGSQL_TRANSACTION_INTRANS + PDO::PGSQL_TRANSACTION_INERROR + PDO::PGSQL_TRANSACTION_UNKNOWN + + + + + + + + Reflection + + + The setAccessible() methods of various Reflection objects have been + deprecated, as those no longer have an effect. + + + + + Calling ReflectionClass::getConstant for constants + that do not exist has been deprecated. + + + + + Calling ReflectionProperty::getDefaultValue for + properties without default values has been deprecated. + + + + + + + SPL + + + Unregistering all autoloaders by passing the + spl_autoload_call function as a callback argument to + spl_autoload_unregister has been deprecated. + Instead if this is needed, one should iterate over the return value of + spl_autoload_functions and call + spl_autoload_unregister on each value. + + + + + The SplObjectStorage::contains, + SplObjectStorage::attach, and + SplObjectStorage::detach methods have been deprecated + in favour of SplObjectStorage::offsetExists, + SplObjectStorage::offsetSet, and + SplObjectStorage::offsetUnset respectively. + + + + + Using ArrayObject and + ArrayIterator with objects has been deprecated. + + + + + + + Standard + + + The socket_set_timeout alias function has been deprecated. + Use stream_set_timeout instead. + + + + + Passing &null; to to readdir, + rewinddir, and closedir + to use the last opened directory has been deprecated. + Provide the last opened directory explicitly instead. + + + + + Passing integers outside the interval [0, 255] to chr + is now deprecated. + This is because a byte can only hold a value within this interval. + + + + + Passing a string which is not a single byte to ord + is now deprecated, this is indicative of a bug. + + + + + The locally predefined variable + $http_response_header + is deprecated. Instead one should call the + http_get_last_response_headers function. + + + + + + + XML + + + The xml_parser_free function has been deprecated, + as XMLParser objects are freed automatically. + + + + + + + From 5ce1ccf3370c3e884b10e79fa1877c2ea7cb9118 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 12 Oct 2025 14:37:42 +0900 Subject: [PATCH 10/36] uncomment deprecated.xml --- appendices/migration85.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appendices/migration85.xml b/appendices/migration85.xml index 917a750d426b..fe140de1a75d 100644 --- a/appendices/migration85.xml +++ b/appendices/migration85.xml @@ -28,11 +28,11 @@ &appendices.migration85.new-functions; &appendices.migration85.constants; &appendices.migration85.incompatible; - &appendices.migration85.windows-support; - + &appendices.migration85.windows-support; - FileInfo From 5a2a1570ae94baec3eef297fa23b121ddcdbcefb Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 12 Oct 2025 14:53:36 +0900 Subject: [PATCH 12/36] [WIP] other-changes.xml template --- appendices/migration85.xml | 2 - appendices/migration85/other-changes.xml | 72 ++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 appendices/migration85/other-changes.xml diff --git a/appendices/migration85.xml b/appendices/migration85.xml index fe140de1a75d..b46a08987ee5 100644 --- a/appendices/migration85.xml +++ b/appendices/migration85.xml @@ -29,9 +29,7 @@ &appendices.migration85.constants; &appendices.migration85.incompatible; &appendices.migration85.deprecated; - &appendices.migration85.windows-support; diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml new file mode 100644 index 000000000000..bee72b9bec37 --- /dev/null +++ b/appendices/migration85/other-changes.xml @@ -0,0 +1,72 @@ + + + Other Changes + + + Core changes + + + xxxx + + + ... + + + + + + + Changes in SAPI Modules + + + xxx + + + ... + + + + + + + Changed Functions + + + Core + + + ... + + + + + DOM + + + ... + + + + + + + From c0b29d2b02ed53f811ceac2567de1f4cb30165f9 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 12 Oct 2025 20:58:54 +0900 Subject: [PATCH 13/36] [other-changes.xml] completed. --- appendices/migration85/other-changes.xml | 712 ++++++++++++++++++++++- 1 file changed, 701 insertions(+), 11 deletions(-) diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml index bee72b9bec37..21d4478ade7d 100644 --- a/appendices/migration85/other-changes.xml +++ b/appendices/migration85/other-changes.xml @@ -5,12 +5,41 @@ Core changes - - xxxx + + Core + + + The high resolution timer (hrtime) on macOS now + uses the recommended + clock_gettime_nsec_np(CLOCK_UPTIME_RAW) API instead of + mach_absolute_time(). + + + + + + CGI/CLI + + + The or option + has been removed as it was non-functional. + Use instead. + + + + + + PDO_ODBC - ... + The fetch behaviour for larger columns has been changed. Rather than + fetching 256 byte blocks, PDO_ODBC will try to fetch a larger block size; + currently, this is the page size minus string overhead. Drivers that + return SQL_NO_TOTAL in SQLGetData are also better handled as well. + This should improve compatibility and performance. + + @@ -18,12 +47,36 @@ Changes in SAPI Modules - - xxx + + CLI + + + Trying to set a process title that is too long with + cli_set_process_title will now fail instead of + silently truncating the given title. + + + + Added a new option to print INI settings + changed from the builtin default. + + + + + + FPM + + + FPM with httpd ProxyPass optionally decodes the full script path. Added + + fastcgi.script_path_encoded INI setting to prevent this + new behavior. + - ... + FPM access log limit now respects log_limit value. + @@ -31,20 +84,657 @@ Changed Functions - + + Intl + + + IntlDateFormatter::setTimeZone/datefmt_set_timezone + throws an IntlException on uninitialised + classes/clone failures. + + + + grapheme_extract properly assigns + $next value when skipping over invalid starting bytes. + Previously there were cases where it would point to the start of the + grapheme boundary instead of the end. + + + + Locale:: methods throw a + ValueError when locale inputs contain null bytes. + + + + transliterator_get_error_code, + transliterator_get_error_message, + TransLiterator::getErrorCode, + and TransLiterator::getErrorMessage + have dropped the false from the return type union. Returning &false; + was actually never possible. + + + + grapheme_strpos, + grapheme_stripos, + grapheme_strrpos, + grapheme_strripos, + grapheme_strstr, + grapheme_stristr and + grapheme_levenshtein functions + add $locale parameter. + + + + + + + LDAP + + + ldap_get_option now accepts a NULL connection, + like ldap_set_option, to allow retrieval of global + options. + + + + + + libxml + + + libxml_set_external_entity_loader now has a formal + return type of true. + + + + + + OpenSSL + + + openssl_public_encrypt and + openssl_private_decrypt have a new parameter + $digest_algo that allows specifying the hash + digest algorithm for OAEP padding. + + + + openssl_sign and openssl_verify + have a new parameter $padding to allow using more + secure RSA PSS padding. + + + + openssl_cms_encrypt $cipher_algo + parameter can be a string with the cipher name. + That allows to use more algorithms including AES GCM cipher algorithms for + auth enveloped data. + + + + + + PCNTL + + + pcntl_exec now has a formal return type of + false. + + + + pcntl_waitid takes an additional resource_usage + argument to gather various platform specific metrics about the child process. + + + + + + PDO_PGSQL + + + PDO::pgsqlCopyFromArray now supports Iterable inputs. + + + + Pdo\Pgsql::setAttribute and + Pdo\Pgsql::prepare support setting + PDO::ATTR_PREFETCH to 0 which enters lazy fetch mode. + In this mode, statements cannot be run in parallel. + + + + + + PDO_SQLITE + + + SQLite PDO::quote will now throw an exception + or emit a warning, depending on the error mode, if the string contains + a null byte. + + + + PDO::sqliteCreateCollation will now throw an + exception if the callback has the wrong return type, making it more + in line with Pdo_Sqlite::createCollation behavior. + + + + + + PostgreSQL + + + pg_copy_from now supports Iterable inputs. + + + + pg_connect checks if the connection_string argument + contains any null byte. + + + + pg_close_stmt checks if the statement_name argument + contains any null byte. + + + + + + POSIX + + + posix_ttyname sets last_error to EBADF when encountering + an invalid file descriptor. + + + + posix_isatty raises an E_WARNING + message when encountering an invalid file descriptor. + + + + posix_fpathconf checks invalid file descriptors and + sets last_error to EBADF and raises an E_WARNING message. + + + + posix_kill throws a ValueError + when the process_id argument is lower or greater than what the platform + supports (signed integer or long range), posix_setpgid + throws a ValueError when the process_id or + the process_group_id is lower than zero or greater than what the platform + supports. + + + + posix_setrlimit throws a ValueError + when the hard_limit or soft_limit arguments are lower than -1 or + if soft_limit is greater than hard_limit. + + + + + + Reflection + + + The output of ReflectionClass::__toString for + enums has changed to better indicate that the class is an enum, and that + the enum cases are enum cases rather than normal class constants. + + + + The output of ReflectionProperty::__toString for + properties with hooks has changed to indicate what hooks the property has, + whether those hooks are final, and whether the property is virtual. + This also affects the output of ReflectionClass::__toString + when a class contains hooked properties. + + + + ReflectionAttribute::newInstance can now throw + errors for internal attributes if the attribute was applied on an invalid + target and the error was delayed from compile time to runtime via the + #[\DelayedTargetValidation] attribute. + + + + + + + Session + + + session_start is stricter in regard to the options + argument. It throws a ValueError if the array is + not a hashmap, or a TypeError if the read_and_close + value is not a valid type compatible with int. + + + + + + SNMP + + + snmpget, + snmpset, + snmp2_get, + snmp2_set, + snmp3_get, + snmp3_set + and SNMP::__construct throw a + ValueError when the hostname + is too large, contains any null byte or if the port is given + when negative or greater than 65535, timeout and retries values + are lower than -1 or too large. + + + + + + Sockets + + + socket_create_listen, + socket_bind and socket_sendto + throw a ValueError if the port is lower than 0 + or greater than 65535, and also if any of the hints array entries are + indexed numerically. + + + + socket_addrinfo_lookup throws a + TypeError if any of the hints values cannot be cast + to int and can throw a ValueError if any of these + values overflow. + + + + socket_set_option with + MCAST_LEAVE_GROUP/MCAST_LEAVE_SOURCE_GROUP + options will throw an exception if the value isn't a valid object or array. + + + + socket_create/socket_bind can + create AF_PACKET family sockets. + + + + socket_getsockname gets the interface index and its + string representation with AF_PACKET socket. + + + + socket_set_option with multicast context throws a + ValueError when the created socket is not of + AF_INET/AF_INET6 family. + + + + + + Tidy + + + tidy::__construct, + tidy::parseFile, + tidy::parseString now throws a + ValueError if the configuration contains an + invalid value or attempts to set a read-only internal entry, + and a TypeError if a configuration key is not a + string. + + + + + + Zlib + + + The "use_include_path" argument for the + gzfile, gzopen and + readgzfile functions has been changed + from int to boolean. + + + + gzfile, + gzopen and readgzfile functions + now respect the default stream context. + + + + + + + + Other Changes to Extensions + + + cURL + + + curl_setopt with + CURLOPT_FOLLOWLOCATION option's value + no longer is treated as boolean but integer to handle + CURLFOLLOW_OBEYCODE and + CURLFOLLOW_FIRSTONLY. + + + + + + Fileinfo + + + Upgraded file from 5.45 to 5.46. + + + + The return type of finfo_close has been changed to + true, rather than bool. + + + + + + Intl + + + Intl's internal error mechanism has been modernized so that it + indicates more accurately which call site caused what error. + Moreover, some ext/date exceptions have been wrapped inside a + IntlException now. + + + + + + Lexbor + + + An always enabled lexbor extension is added. It contains the lexbor + library that was separated from ext/dom + for being reused among other extensions. + The new extension is not directly exposed to userland. + + + + + + Opcache + + + The Opcache extension is now always + built into the PHP binary and is always loaded. + The INI directives opcache.enable + and opcache.enable_cli are + still honored. + + + + + + URI + + + An always enabled uri extension is added that can be used for handling + URIs and URLs according to RFC 3986 and WHATWG URL. + + + + + + + PCRE + + + Upgraded pcre2lib from 10.44 to 10.46. + + + + + + PDO_Sqlite + + + Increased minimum release version support from 3.7.7 to 3.7.17. + + + + + + Readline + + + The return types of readline_add_history, + readline_clear_history, + and readline_callback_handler_install have been + changed to true, rather than bool. + + + + + + Reflection + + + ReflectionConstant is no longer final. + + + + + + + + Changes to INI File Handling + + Core - ... + Added fatal_error_backtraces to control whether fatal errors should include + a backtrace. + + + + + Added startup-only max_memory_limit INI setting to control the maximum + memory_limit that may be configured at startup or runtime. Exceeding this + value emits a warning, unless set to -1, and sets memory_limit to the + current max_memory_limit instead. + + - - DOM + + Opcache + + + Added opcache.file_cache_read_only to support a read-only + opcache.file_cache directory, + for use with read-only file systems (e.g. read-only Docker containers). + Best used with opcache.validate_timestamps=0, + opcache.enable_file_override=1, + and opcache.file_cache_consistency_checks=0. + + + + + A cache generated with a different build of PHP, a different file + path, or different settings (including which extensions are loaded), may be + ignored. + + - ... + The default value of + opcache.jit_hot_loop is + now 61 (a prime) to prevent it from being a multiple of loop iteration + counts. + It is recommended that this parameter is set to a prime number. + + + Changing opcache.memory_consumption + when OPcache SHM is already set up will now correctly report a failure + instead of silently doing nothing and showing misleading values in PHPInfo. + + + + + + OpenSSL + + + Added openssl.libctx to select the OpenSSL library context type. Either + custom libctx for each thread can be used or a single global (default) + libctx is used. + + + + + + + + Performance + + + Core + + + Remove OPcodes for identity comparisons against booleans, particularly + for the match(true) pattern. + + + + Add OPcode specialization for === [] and + !== [] comparisons. + + + + Creating exception objects is now much faster. + + + + The parts of the code that used SSE2 have been adapted to use SIMD + with ARM NEON as well. + + + + Introduced the TAILCALL VM, enabled by default when compiling with Clang>=19 + on x86_64 or aarch64. The TAILCALL VM is as fast as the HYBRID VM used when + compiling with GCC. This makes PHP binaries built with Clang>=19 as fast as + binaries built with GCC. The performance of the CALL VM, used with other + compilers, has also improved considerably. + + + + + + Intl + + + Now avoids creating extra string copies when converting strings + for use in the collator. + + + + + + MBString + + + The parts of the code that used SSE2 have been adapted to use SIMD + with ARM NEON as well. + + + + + + Opcache + + + Improved performance of fetching TLS variables in JIT'ed code in non-Glibc + builds. + + + + + + Reflection + + + Improved performance of the following methods: + + ReflectionProperty::getValue + ReflectionProperty::getRawValue + ReflectionProperty::isInitialized + ReflectionProperty::isInitialized + ReflectionProperty::setValue + ReflectionProperty::setRawValue + + + + + + + SPL + + + Improved performance of dimension accessors and methods of + SplFixedArray. + + + + + + Standard + + + Improved performance of array functions with callbacks + (array_find, array_filter, + array_map, usort, ...). + + + + Improved performance of urlencode and + rawurlencode. + + + + Improved unpack performance with nameless + repetitions by avoiding creating temporary strings and reparsing them. + + + + Improved pack performance. + + + + Minor improvements in array_chunk performance. + + + + + + XML + + + Improved XMLReader property access performance. + + + + Improved XMLWriter performance and reduced memory + consumption. + + From 46ad7d6a7aa2a8a838c47518bd301abf5db9adf5 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Wed, 15 Oct 2025 01:03:59 +0900 Subject: [PATCH 14/36] added Closure and first class callables link --- appendices/migration85/new-features.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index b1f9ca02d7ca..0d2b867d06bc 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -29,8 +29,9 @@ print $result . PHP_EOL; // Prints "11" Closure in constant expressions - Added support for Closures and first class callables in constant - expressions. This includes: + Added support for Closures and + first class callables + in constant expressions. This includes: Attribute parameters. From 51ee8ef034e0265385c3d230765fd098192db57d Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Wed, 15 Oct 2025 01:26:02 +0900 Subject: [PATCH 15/36] clearify "compipe-time non-class constants". --- appendices/migration85/new-features.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index 0d2b867d06bc..da6ccb9bf910 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -90,7 +90,9 @@ $results = concat("a", "b"); Attributes on Constants - Added support for attributes on compile-time non-class constants. + Added support for attributes on compile-time non-class constants + (e.g. const MY_CONST = 1; rather than + define('MY_CONST', 1);). From 2117e364f939918553a8bb20a02b2bd417f45c5f Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Fri, 17 Oct 2025 23:38:54 +0900 Subject: [PATCH 16/36] added class.curlsharepersistenthandle link --- appendices/migration85/new-features.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index da6ccb9bf910..5c97ab354cbb 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -184,8 +184,10 @@ print T1 . PHP_EOL; // Prints "0" cURL - Added support for share handles that are persisted across multiple PHP - requests, safely allowing for more effective connection reuse. + Added support for + share handles + that are persisted across multiple PHP requests, safely allowing for + more effective connection reuse. From 3bcc889bd072f64e9a374e1c925eb65c211df56d Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 18 Oct 2025 00:22:03 +0900 Subject: [PATCH 17/36] deleted duplicate entry --- appendices/migration85/new-features.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index 5c97ab354cbb..499d48c2bb81 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -241,11 +241,6 @@ print T1 . PHP_EOL; // Prints "0" this value is available as the "conn_id" key. - - Added support for CURLINFO_CONN_ID (libcurl >= 8.2.0) - to the curl_getinfo. - - Added support for CURLINFO_QUEUE_TIME_T (libcurl >= 8.6.0) to the curl_getinfo function. This constant allows From 3dd26889b3426485b1a63d75bf16bdaf9c185d40 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 18 Oct 2025 17:51:15 +0900 Subject: [PATCH 18/36] deleted invalid new functions entry (curl_multi_add_handle) --- appendices/migration85/new-functions.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/appendices/migration85/new-functions.xml b/appendices/migration85/new-functions.xml index f0b925767eeb..fe768ee9e653 100644 --- a/appendices/migration85/new-functions.xml +++ b/appendices/migration85/new-functions.xml @@ -22,7 +22,6 @@ curl_multi_get_handles - curl_multi_add_handle curl_share_init_persistent From 1464bc60a0be6298fd4e77fb942518301b3a2eda Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 19 Oct 2025 22:19:10 +0900 Subject: [PATCH 19/36] more fix about markup --- appendices/migration85/incompatible.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index c5a365ac0f4f..8183d754cad5 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -113,8 +113,8 @@ disable_classes INI setting - The disable_classes INI setting has been removed as it causes various - engine assumptions to be broken. + The disable_classes INI setting + has been removed as it causes various engine assumptions to be broken. @@ -311,10 +311,11 @@ The constructor arguments set in conjunction with PDO::FETCH_CLASS now follow the usual CUFA - (call_user_func_array) semantics. + (call_user_func_array) semantics. This means string keys will act like a named argument. Moreover, automatic wrapping for by-value arguments passed to a by-ref - parameter has been removed, and the usual E_WARNING about this is now emitted. + parameter has been removed, and the usual E_WARNING + about this is now emitted. To pass a variable by-ref to a constructor argument use the general array value reference assignment: $ctor_args = [&$valByRef] From 9f8fabd72d8733c8f16f099a9d0f2bcd25221a0b Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 19 Oct 2025 22:32:43 +0900 Subject: [PATCH 20/36] moved URI extention description to new-features.xml --- appendices/migration85/new-features.xml | 11 +++++++++++ appendices/migration85/other-changes.xml | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index 499d48c2bb81..ca4dd48ec861 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -411,6 +411,17 @@ print T1 . PHP_EOL; // Prints "0" + + URI + + + An always enabled uri extension is added that can be used for handling + URIs and URLs according to RFC 3986 and WHATWG URL. + + + + + XSL diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml index 21d4478ade7d..eacc46484373 100644 --- a/appendices/migration85/other-changes.xml +++ b/appendices/migration85/other-changes.xml @@ -478,17 +478,6 @@ - - URI - - - An always enabled uri extension is added that can be used for handling - URIs and URLs according to RFC 3986 and WHATWG URL. - - - - - PCRE From e3a2108ab789c4ff712e09606d46d673efe20389 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Mon, 20 Oct 2025 01:47:51 +0900 Subject: [PATCH 21/36] clearify pipe character (|). --- appendices/migration85/incompatible.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 8183d754cad5..4ccc4a28ea8f 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -369,8 +369,8 @@ Attempting to write session data where $_SESSION has a key - containing the pipe character will now emit a warning instead of silently - failing. + containing the pipe character (|) will now emit a warning + instead of silently failing. From 4f86bb514f4e7cf49667f002e480fc8c080fcc8c Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Mon, 20 Oct 2025 21:28:56 +0900 Subject: [PATCH 22/36] add missing entries for FILTER_THROW_ON_FAILURE RFC --- appendices/migration85/constants.xml | 10 ++++++++++ appendices/migration85/new-classes.xml | 9 +++++++++ appendices/migration85/new-features.xml | 15 +++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/appendices/migration85/constants.xml b/appendices/migration85/constants.xml index 76a47c83f314..0b8a86d31536 100644 --- a/appendices/migration85/constants.xml +++ b/appendices/migration85/constants.xml @@ -49,6 +49,16 @@ + + Filter + + + + FILTER_THROW_ON_FAILURE + + + + Intl diff --git a/appendices/migration85/new-classes.xml b/appendices/migration85/new-classes.xml index a0f50aefa416..d47bed152f20 100644 --- a/appendices/migration85/new-classes.xml +++ b/appendices/migration85/new-classes.xml @@ -20,6 +20,15 @@ + + Filter + + Filter\FilterException + Filter\FilterFailedException + + + + URI diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index ca4dd48ec861..73a5029b31f4 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -285,6 +285,21 @@ print T1 . PHP_EOL; // Prints "0" + + Filter + + + Added new FILTER_THROW_ON_FAILURE flag which can be + passed to the filter functions and will force an exception to be triggered + when validation fails. + The new flag cannot be combined with + FILTER_NULL_ON_FAILURE; trying to do so will result + in a ValueError being thrown. + + + + + Intl From 3d7f6f5e3eae7a37327e0a20f69b75c3ed832ec4 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Mon, 20 Oct 2025 21:37:21 +0900 Subject: [PATCH 23/36] PHP 8.5 | UPGRADING: fix entry about new grapheme $locale parameter https://github.com/php/php-src/commit/cea52f796e8339023a452277f7de0cd7e6c2a8eb --- appendices/migration85/other-changes.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml index eacc46484373..987e5379fffc 100644 --- a/appendices/migration85/other-changes.xml +++ b/appendices/migration85/other-changes.xml @@ -119,9 +119,9 @@ grapheme_stripos, grapheme_strrpos, grapheme_strripos, - grapheme_strstr, - grapheme_stristr and - grapheme_levenshtein functions + grapheme_substr, + grapheme_strstr and + grapheme_stristr functions add $locale parameter. From 62852ceb1298bef9f98743f0d5f8fa922e5682cf Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Tue, 21 Oct 2025 00:53:13 +0900 Subject: [PATCH 24/36] markup and typo tweaks --- appendices/migration85/deprecated.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml index 18b0a76d969e..16d53e31b4c2 100644 --- a/appendices/migration85/deprecated.xml +++ b/appendices/migration85/deprecated.xml @@ -161,11 +161,11 @@ - Deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string for - non-CLI SAPIs has been deprecated. - Configure register_argc_argv=0 and switch to either $_GET or - $_SERVER['QUERY_STRING'] to access the information, after verifying - that the usage is safe. + Deriving $_SERVER['argc'] and $_SERVER['argv'] + from the query string for non-CLI SAPIs has been deprecated. + Configure register_argc_argv=0 and switch to either + $_GET or $_SERVER['QUERY_STRING'] + to access the information, after verifying that the usage is safe. @@ -478,7 +478,7 @@ - Passing &null; to to readdir, + Passing &null; to readdir, rewinddir, and closedir to use the last opened directory has been deprecated. Provide the last opened directory explicitly instead. From f38e1e1a2eedb2c4f674764112428d5b01dd0d69 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Wed, 22 Oct 2025 23:51:08 +0900 Subject: [PATCH 25/36] added clone_with_v2 functionality. https://wiki.php.net/rfc/clone_with_v2 --- appendices/migration85/new-features.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index 73a5029b31f4..6b8fc12c63e3 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -178,6 +178,18 @@ print T1 . PHP_EOL; // Prints "0" + + Clone function + + + The clone language construct is now a function and supports reassigning + (readonly) properties during cloning via the new + $withProperties parameter. + + + + + From a288458661ad8132d348368d3ca14bcd6f03c5c7 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 25 Oct 2025 19:43:13 +0900 Subject: [PATCH 26/36] added SoapClient::__doRequest undocumented backwards incompatible in PHP 8.5 https://github.com/php/php-src/pull/20278 --- appendices/migration85/incompatible.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 4ccc4a28ea8f..292e18e46978 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -386,6 +386,20 @@ + + SOAP + + + SoapClient::__doRequest now accepts a new, + optional $uriParserClass parameter accepting string or null arguments. + Null represents the original (parse_url) based + method, while the new backends will be used when passing either + Uri\Rfc3986\Uri::class or Uri\WhatWg\Url::class. + + + + + SPL From 928e2f4cbde69252454ebd6252619fd3d9599553 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 25 Oct 2025 20:30:03 +0900 Subject: [PATCH 27/36] fixed markup --- appendices/migration85/incompatible.xml | 3 ++- appendices/migration85/new-features.xml | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 292e18e46978..7a38bea60b90 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -391,7 +391,8 @@ SoapClient::__doRequest now accepts a new, - optional $uriParserClass parameter accepting string or null arguments. + optional $uriParserClass parameter accepting + string or null arguments. Null represents the original (parse_url) based method, while the new backends will be used when passing either Uri\Rfc3986\Uri::class or Uri\WhatWg\Url::class. diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index 6b8fc12c63e3..b9304f680ffd 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -182,9 +182,9 @@ print T1 . PHP_EOL; // Prints "0" Clone function - The clone language construct is now a function and supports reassigning - (readonly) properties during cloning via the new - $withProperties parameter. + The clone language construct + is now a function and supports reassigning (readonly) properties during + cloning via the new $withProperties parameter. From 870fc8d8ba530f1081ff20ca71caba0b05b2475a Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 2 Nov 2025 17:18:32 +0900 Subject: [PATCH 28/36] Apply suggestions from code review Co-authored-by: Gina Peter Banyard --- appendices/migration85.xml | 8 +-- appendices/migration85/deprecated.xml | 11 +++-- appendices/migration85/incompatible.xml | 62 ++++++++++++------------ appendices/migration85/new-features.xml | 14 +++--- appendices/migration85/other-changes.xml | 49 +++++++++---------- 5 files changed, 72 insertions(+), 72 deletions(-) diff --git a/appendices/migration85.xml b/appendices/migration85.xml index b46a08987ee5..99214921af2f 100644 --- a/appendices/migration85.xml +++ b/appendices/migration85.xml @@ -2,15 +2,15 @@ Migrating from PHP 8.4.x to PHP 8.5.x - + This new minor version brings with it a number of new features and a few incompatibilities that should be tested for before switching PHP versions in production environments. - + - + &manual.migration.seealso; 7.1.x, 7.2.x, @@ -21,7 +21,7 @@ 8.2.x. 8.3.x. 8.4.x. - + &appendices.migration85.new-features; &appendices.migration85.new-classes; diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml index 16d53e31b4c2..10fb1c1f32f6 100644 --- a/appendices/migration85/deprecated.xml +++ b/appendices/migration85/deprecated.xml @@ -92,6 +92,7 @@ Constant redeclaration has been deprecated. + Note that this already generated a warning and will continue to do so. @@ -139,7 +140,7 @@ - Using null as an array offset or when calling array_key_exists + Using &null; as an array offset or when calling array_key_exists is now deprecated. Instead an empty string should be used. @@ -307,7 +308,7 @@ The $key_length parameter for openssl_pkey_derive has been deprecated. This is because it is either ignored, or truncates the key, which can be - a vulnerability. + a security vulnerability. @@ -317,7 +318,7 @@ PDO - The "uri:" DSN scheme has been deprecated due to security concerns with + The "uri:" DSN scheme has been deprecated due to security concerns with DSNs coming from remote URIs. @@ -400,7 +401,7 @@ PDO_PGSQL - Constants related to transaction states have been deprecated: + Constants related to transaction states have been deprecated as this feature is unavailable with PDO: PDO::PGSQL_TRANSACTION_IDLE @@ -486,7 +487,7 @@ - Passing integers outside the interval [0, 255] to chr + Passing integers outside the interval [0, 255] to chr is now deprecated. This is because a byte can only hold a value within this interval. diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 7a38bea60b90..32d5a3cc29b5 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -46,7 +46,7 @@ Substitute static keyword in final subclass - It is now allowed to substitute static with self or the concrete class name + It is now allowed to substitute static with self or the concrete class name in final subclasses. @@ -99,12 +99,12 @@ Attribute apply error during compilation - Applying #[\Attribute] to an abstract class, enum, interface, or trait + Applying #[\Attribute] to an abstract class, enum, interface, or trait triggers an error during compilation. Previously, the attribute could be added, but when ReflectionAttribute::newInstance was called an error would be thrown. The error can be delayed from compilation to runtime using the new - #[\DelayedTargetValidation] attribute. + #[\DelayedTargetValidation] attribute. @@ -124,7 +124,7 @@ Destructing non-array values - Destructing non-array values (other than NULL) using [] or list() now + Destructing non-array values (other than &null;) using [] or list now emits a warning. @@ -153,58 +153,58 @@ Bzip2 - + bzcompress now throws a ValueError when $block_size is not between 1 and 9. - + - + bzcompress now throws a ValueError when $work_factor is not between 0 and 250. - + DOM - + Cloning a DOMNamedNodeMap, DOMNodeList, Dom\NamedNodeMap, Dom\NodeList, Dom\HTMLCollection, and Dom\DtdNamedNodeMap now fails. This never actually resulted in a working object, so the impact should actually be zero. - + FileInfo - + finfo_file and finfo::file - now throws a ValueError instead of a - TypeError when $filename + now throws a ValueError instead of a + TypeError when $filename contains nul bytes. This aligns the type of Error thrown to be consistent with the rest of the language. - + Intl - + The extension now requires at least ICU 57.1. - + - + The behaviour of Collator::SORT_REGULAR with respect to handling numeric strings is now aligned with the behaviour of SORT_REGULAR in ext/standard. - + @@ -213,7 +213,7 @@ ldap_get_option and ldap_set_option - now throw a ValueError when passing an invalid option. + now throw a ValueError when passing an invalid option. @@ -232,7 +232,7 @@ Calling the mysqli constructor on an already-constructed object - is now no longer possible and throws an Error. + is now no longer possible and throws an Error. @@ -266,8 +266,8 @@ The / - configure flags have been removed, and the build does not produce opcache.so - or php_opcache.dll objects anymore. + configure flags have been removed, and the build does not produce opcache.so + or php_opcache.dll objects anymore. @@ -282,12 +282,12 @@ PCNTL - pcntl_exec now throws ValueError + pcntl_exec now throws ValueError when entries of the $args parameter contain null bytes. - pcntl_exec now throws ValueError + pcntl_exec now throws ValueError when entries or keys of the $env_vars parameter contain null bytes. @@ -326,7 +326,7 @@ PDO::fetchObject, PDO::fetchAll, for example using tricks such as passing the statement object as a constructor argument when fetching into an - object, will now throw an Error. + object, will now throw an Error. @@ -338,14 +338,14 @@ - A ValueError is now thrown if + A ValueError is now thrown if PDO::FETCH_PROPS_LATE is used with a fetch mode different than PDO::FETCH_CLASS, consistent with other fetch flags. - A ValueError is now thrown if + A ValueError is now thrown if PDO::FETCH_INTO is used as a fetch mode in PDO::fetchAll, similar to PDO::FETCH_LAZY. @@ -357,7 +357,7 @@ PDO_FIREBIRD - A ValueError is now thrown when trying to set a cursor + A ValueError is now thrown when trying to set a cursor name that is too long on a PDOStatement resulting from the Firebird driver. @@ -392,10 +392,10 @@ SoapClient::__doRequest now accepts a new, optional $uriParserClass parameter accepting - string or null arguments. - Null represents the original (parse_url) based + string or &null; arguments. + &null; represents the original (parse_url) based method, while the new backends will be used when passing either - Uri\Rfc3986\Uri::class or Uri\WhatWg\Url::class. + Uri\Rfc3986\Uri or Uri\WhatWg\Url. diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index b9304f680ffd..ac4095c3ad96 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -54,9 +54,9 @@ print $result . PHP_EOL; // Prints "11" - Also, added the (void) cast to indicate that not using a value is intentional. - The (void) cast has no effect on the program's execution by itself, but - it can be used to suppress warnings emitted by #[\NoDiscard] and possibly + Also, added the (void) cast to indicate that not using a value is intentional. + The (void) cast has no effect on the program's execution by itself, but + it can be used to suppress warnings emitted by #[\NoDiscard] and possibly also diagnostics emitted by external IDEs or static analysis tools. @@ -288,7 +288,7 @@ print T1 . PHP_EOL; // Prints "0" EXIF - Added OffsetTime* Exif tags. + Added support for OffsetTime* Exif tags. @@ -306,7 +306,7 @@ print T1 . PHP_EOL; // Prints "0" when validation fails. The new flag cannot be combined with FILTER_NULL_ON_FAILURE; trying to do so will result - in a ValueError being thrown. + in a ValueError being thrown. @@ -453,11 +453,11 @@ print T1 . PHP_EOL; // Prints "0" XSL - The $namespace argument of XSLTProcessor::getParameter, + The $namespace argument of XSLTProcessor::getParameter, XSLTProcessor::setParameter and XSLTProcessor::removeParameter now actually works instead of being treated as empty. - This only works if the $name argument does not use Clark notation and is not a + This only works if the $name argument does not use Clark notation and is not a QName because in those cases the namespace is taken from the namespace href or prefix respectively. diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml index 987e5379fffc..cd98a6baa661 100644 --- a/appendices/migration85/other-changes.xml +++ b/appendices/migration85/other-changes.xml @@ -68,9 +68,8 @@ FPM with httpd ProxyPass optionally decodes the full script path. Added - - fastcgi.script_path_encoded INI setting to prevent this - new behavior. + fastcgi.script_path_encoded + INI setting to prevent this new behavior. @@ -89,7 +88,7 @@ IntlDateFormatter::setTimeZone/datefmt_set_timezone - throws an IntlException on uninitialised + throws an IntlException on uninitialised classes/clone failures. @@ -101,8 +100,8 @@ - Locale:: methods throw a - ValueError when locale inputs contain null bytes. + All Locale methods now throw a + ValueError when the locale argument contain null bytes. @@ -115,14 +114,14 @@ + The following functions now support a $locale argument: grapheme_strpos, grapheme_stripos, grapheme_strrpos, grapheme_strripos, grapheme_substr, grapheme_strstr and - grapheme_stristr functions - add $locale parameter. + grapheme_stristr @@ -132,7 +131,7 @@ LDAP - ldap_get_option now accepts a NULL connection, + ldap_get_option now accepts a &null; connection, like ldap_set_option, to allow retrieval of global options. @@ -226,7 +225,7 @@ PostgreSQL - pg_copy_from now supports Iterable inputs. + pg_copy_from now supports iterable inputs. @@ -260,16 +259,16 @@ - posix_kill throws a ValueError + posix_kill throws a ValueError when the process_id argument is lower or greater than what the platform supports (signed integer or long range), posix_setpgid - throws a ValueError when the process_id or + throws a ValueError when the process_id or the process_group_id is lower than zero or greater than what the platform supports. - posix_setrlimit throws a ValueError + posix_setrlimit throws a ValueError when the hard_limit or soft_limit arguments are lower than -1 or if soft_limit is greater than hard_limit. @@ -308,8 +307,8 @@ session_start is stricter in regard to the options - argument. It throws a ValueError if the array is - not a hashmap, or a TypeError if the read_and_close + argument. It throws a ValueError if the array is + not a hashmap, or a TypeError if the read_and_close value is not a valid type compatible with int. @@ -326,7 +325,7 @@ snmp3_get, snmp3_set and SNMP::__construct throw a - ValueError when the hostname + ValueError when the hostname is too large, contains any null byte or if the port is given when negative or greater than 65535, timeout and retries values are lower than -1 or too large. @@ -340,15 +339,15 @@ socket_create_listen, socket_bind and socket_sendto - throw a ValueError if the port is lower than 0 + throw a ValueError if the port is lower than 0 or greater than 65535, and also if any of the hints array entries are indexed numerically. socket_addrinfo_lookup throws a - TypeError if any of the hints values cannot be cast - to int and can throw a ValueError if any of these + TypeError if any of the hints values cannot be cast + to int and can throw a ValueError if any of these values overflow. @@ -370,7 +369,7 @@ socket_set_option with multicast context throws a - ValueError when the created socket is not of + ValueError when the created socket is not of AF_INET/AF_INET6 family. @@ -383,9 +382,9 @@ tidy::__construct, tidy::parseFile, tidy::parseString now throws a - ValueError if the configuration contains an + ValueError if the configuration contains an invalid value or attempts to set a read-only internal entry, - and a TypeError if a configuration key is not a + and a TypeError if a configuration key is not a string. @@ -395,7 +394,7 @@ Zlib - The "use_include_path" argument for the + The $use_include_path argument for the gzfile, gzopen and readgzfile functions has been changed from int to boolean. @@ -554,11 +553,11 @@ - + A cache generated with a different build of PHP, a different file path, or different settings (including which extensions are loaded), may be ignored. - + From 8b62bd4cc5d44379f31b2b5d7033d1e08daed32a Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 2 Nov 2025 17:55:04 +0900 Subject: [PATCH 29/36] fixed missing indent --- appendices/migration85/deprecated.xml | 4 ++-- appendices/migration85/incompatible.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml index 10fb1c1f32f6..882c2bd662c0 100644 --- a/appendices/migration85/deprecated.xml +++ b/appendices/migration85/deprecated.xml @@ -57,8 +57,8 @@ - The backtick operator - as an alias for shell_exec has been deprecated. + The backtick operator + as an alias for shell_exec has been deprecated. diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 32d5a3cc29b5..522f7bed1304 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -36,8 +36,8 @@ Return value of gc_collect_cycles - The return value of gc_collect_cycles no longer includes - strings and resources that were indirectly collected through cycles. + The return value of gc_collect_cycles no longer includes + strings and resources that were indirectly collected through cycles. From bc0ae40ff83ced5cee2acdb370a069d76c6f0de7 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 2 Nov 2025 18:10:39 +0900 Subject: [PATCH 30/36] fixed `log-limit` fpm ini setting link. --- appendices/migration85/other-changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml index cd98a6baa661..2f815b79d741 100644 --- a/appendices/migration85/other-changes.xml +++ b/appendices/migration85/other-changes.xml @@ -73,7 +73,7 @@ - FPM access log limit now respects log_limit value. + FPM access log limit now respects log_limit value. From 4f892b5b089b87fd2f1dd92075c3537f25042bc3 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 2 Nov 2025 18:44:11 +0900 Subject: [PATCH 31/36] Added link for new INI setting TODO comment (openssl.libctx) --- appendices/migration85/other-changes.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml index 2f815b79d741..b6613b168162 100644 --- a/appendices/migration85/other-changes.xml +++ b/appendices/migration85/other-changes.xml @@ -581,8 +581,9 @@ OpenSSL - Added openssl.libctx to select the OpenSSL library context type. Either - custom libctx for each thread can be used or a single global (default) + Added openssl.libctx + to select the OpenSSL library context type. + Either custom libctx for each thread can be used or a single global (default) libctx is used. From dc23d16030d94dc42e45990667c761e1ae827602 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 2 Nov 2025 18:51:12 +0900 Subject: [PATCH 32/36] deleted mhash*() function descrption --- appendices/migration85/deprecated.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml index 882c2bd662c0..bb8d67a41c57 100644 --- a/appendices/migration85/deprecated.xml +++ b/appendices/migration85/deprecated.xml @@ -245,10 +245,8 @@ Hash - The MHASH_* constants - have been deprecated. These have been overlooked when the mhash*() function - family has been deprecated per - + The MHASH_* constants have + been deprecated. From eaa8c6828f773ee65b258fec0e560a94ce67f169 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 2 Nov 2025 19:12:41 +0900 Subject: [PATCH 33/36] deleted Datetime related magic method deprecation. --- appendices/migration85/deprecated.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml index bb8d67a41c57..97bba0647df1 100644 --- a/appendices/migration85/deprecated.xml +++ b/appendices/migration85/deprecated.xml @@ -200,16 +200,6 @@ - - The __wakeup() magic method of - DateTimeInterface, - DateTime, DateTimeImmutable, - DateTimeZone, DateInterval, - and DatePeriod has been deprecated in favour of - the __unserialize() magic method. - - - From 9382594c7e92602c06d0100a281a033174cf2cdf Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Tue, 4 Nov 2025 20:47:18 +0900 Subject: [PATCH 34/36] Apply suggestions from code review part II. Co-authored-by: Gina Peter Banyard --- appendices/migration85/deprecated.xml | 2 +- appendices/migration85/incompatible.xml | 93 ++++++++++++------------ appendices/migration85/new-features.xml | 18 ++--- appendices/migration85/other-changes.xml | 6 +- 4 files changed, 59 insertions(+), 60 deletions(-) diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml index 97bba0647df1..ef39e1e9a8fa 100644 --- a/appendices/migration85/deprecated.xml +++ b/appendices/migration85/deprecated.xml @@ -407,7 +407,7 @@ Reflection - The setAccessible() methods of various Reflection objects have been + The setAccessible() methods of various Reflection objects have been deprecated, as those no longer have an effect. diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 522f7bed1304..9c527bd10684 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -173,8 +173,7 @@ DOMNodeList, Dom\NamedNodeMap, Dom\NodeList, Dom\HTMLCollection, and Dom\DtdNamedNodeMap now fails. - This never actually resulted in a working object, so the impact should - actually be zero. + This never actually resulted in a working object, therefore no impact is expected. @@ -211,104 +210,104 @@ LDAP - + ldap_get_option and ldap_set_option now throw a ValueError when passing an invalid option. - + MBString - + Unicode data tables have been updated to Unicode 17.0 - + MySQLi - + Calling the mysqli constructor on an already-constructed object is now no longer possible and throws an Error. - + ODBC - + ODBC now assumes that at least ODBC 3.5 functionality is available. The ODBCVER definition and build system flags to control it have been removed. - + - + ODBC no longer has build flags to build against specific drivers (except for DB2) and removes special cases for those drivers. It is strongly recommended to use a driver manager like iODBC or unixODBC on non-Windows. - + Opcache - + The Opcache extension is now always built into the PHP binary and is always loaded. The INI directives opcache.enable and opcache.enable_cli are still honored. - + - + The / configure flags have been removed, and the build does not produce opcache.so or php_opcache.dll objects anymore. - + - + Using zend_extension=opcache.so or zend_extension=php_opcache.dll INI directives will emit a warning. - + PCNTL - + pcntl_exec now throws ValueError when entries of the $args parameter contain null bytes. - + - + pcntl_exec now throws ValueError when entries or keys of the $env_vars parameter contain null bytes. - + PCRE - + The extension is compiled without semi-deprecated PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK compile option. - + PDO - + The constructor arguments set in conjunction with PDO::FETCH_CLASS now follow the usual CUFA (call_user_func_array) semantics. @@ -318,78 +317,78 @@ about this is now emitted. To pass a variable by-ref to a constructor argument use the general array value reference assignment: $ctor_args = [&$valByRef] - + - + Attempting to call PDOStatement::setFetchMode during a call to PDO::fetch, PDO::fetchObject, PDO::fetchAll, for example using tricks such as passing the statement object as a constructor argument when fetching into an object, will now throw an Error. - + - + The value of the constants PDO::FETCH_GROUP, PDO::FETCH_UNIQUE, PDO::FETCH_CLASSTYPE, PDO::FETCH_PROPS_LATE, and PDO::FETCH_SERIALIZE have changed. - + A ValueError is now thrown if PDO::FETCH_PROPS_LATE is used with a fetch mode different than PDO::FETCH_CLASS, consistent with other fetch flags. - + - + A ValueError is now thrown if PDO::FETCH_INTO is used as a fetch mode in PDO::fetchAll, similar to PDO::FETCH_LAZY. - + PDO_FIREBIRD - + A ValueError is now thrown when trying to set a cursor name that is too long on a PDOStatement resulting from the Firebird driver. - + Session - + Attempting to write session data where $_SESSION has a key containing the pipe character (|) will now emit a warning instead of silently failing. - + SimpleXML - + Passing an XPath expression that returns something other than a node set to SimpleXMLElement::xpath will now emit a warning and return &false;, instead of silently failing and returning an empty array. - + SOAP - + SoapClient::__doRequest now accepts a new, optional $uriParserClass parameter accepting string or &null; arguments. @@ -397,35 +396,35 @@ method, while the new backends will be used when passing either Uri\Rfc3986\Uri or Uri\WhatWg\Url. - + SPL - + ArrayObject no longer accepts enums, as modifying the $name or $value properties can break engine assumptions. - + - + SplFileObject::fwrite's parameter $length is now nullable. The default value changed from 0 to &null;. - + Standard - + Using a printf-family function with a formatter that did not specify the precision previously incorrectly reset the precision instead of treating it as a precision of 0. - + diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index ac4095c3ad96..5f2424d70af2 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -347,21 +347,21 @@ print T1 . PHP_EOL; // Prints "0" PDO_Sqlite - Added class constant Pdo_Sqlite::ATTR_BUSY_STATEMENT. + Added class constant Pdo\Sqlite::ATTR_BUSY_STATEMENT. - Added class constants Pdo_Sqlite::ATTR_EXPLAIN_STATEMENT, - Pdo_Sqlite::EXPLAIN_MODE_PREPARED, - Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN, - Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN. + Added class constants Pdo\Sqlite::ATTR_EXPLAIN_STATEMENT, + Pdo\Sqlite::EXPLAIN_MODE_PREPARED, + Pdo\Sqlite::EXPLAIN_MODE_EXPLAIN, + Pdo\Sqlite::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN. - Added PDO\Sqlite::ATTR_TRANSACTION_MODE connection attribute - with possible values PDO\Sqlite::TRANSACTION_MODE_DEFERRED, - PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE, - and PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE, + Added Pdo\Sqlite::ATTR_TRANSACTION_MODE connection attribute + with possible values Pdo\Sqlite::TRANSACTION_MODE_DEFERRED, + Pdo\Sqlite::TRANSACTION_MODE_IMMEDIATE, + and Pdo\Sqlite::TRANSACTION_MODE_EXCLUSIVE, allowing to configure the transaction mode to use when calling beginTransaction(). diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml index b6613b168162..54b201522362 100644 --- a/appendices/migration85/other-changes.xml +++ b/appendices/migration85/other-changes.xml @@ -109,7 +109,7 @@ transliterator_get_error_message, TransLiterator::getErrorCode, and TransLiterator::getErrorMessage - have dropped the false from the return type union. Returning &false; + have dropped &false; from the return type union. Returning &false; was actually never possible. @@ -192,7 +192,7 @@ PDO_PGSQL - PDO::pgsqlCopyFromArray now supports Iterable inputs. + Pdo\Pgsql::copyFromArray now supports iterable inputs. @@ -216,7 +216,7 @@ PDO::sqliteCreateCollation will now throw an exception if the callback has the wrong return type, making it more - in line with Pdo_Sqlite::createCollation behavior. + in line with Pdo\Sqlite::createCollation behavior. From de74591579ee44eea27792ac6209a5fc67761f84 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Tue, 4 Nov 2025 20:52:27 +0900 Subject: [PATCH 35/36] nits markup tweaks --- appendices/migration85/incompatible.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 9c527bd10684..c4fad540bcb1 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -336,7 +336,7 @@ PDO::FETCH_SERIALIZE have changed. - + A ValueError is now thrown if PDO::FETCH_PROPS_LATE is used with a fetch mode different than PDO::FETCH_CLASS, consistent with From 35ce39c70aaae13161178efd73765d0d3bf409d4 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Tue, 4 Nov 2025 21:09:14 +0900 Subject: [PATCH 36/36] moved [ValueError|TypeError] BC Break changes to incompatible.xml --- appendices/migration85/incompatible.xml | 98 ++++++++++++++++++++++++ appendices/migration85/other-changes.xml | 93 ---------------------- 2 files changed, 98 insertions(+), 93 deletions(-) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index c4fad540bcb1..03d0cff21376 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -199,6 +199,11 @@ The extension now requires at least ICU 57.1. + + All Locale methods now throw a + ValueError when the locale argument contain null bytes. + + The behaviour of Collator::SORT_REGULAR with respect to handling numeric strings is now aligned with the behaviour of @@ -363,6 +368,26 @@ + + POSIX + + + posix_kill throws a ValueError + when the process_id argument is lower or greater than what the platform + supports (signed integer or long range), posix_setpgid + throws a ValueError when the process_id or + the process_group_id is lower than zero or greater than what the platform + supports. + + + + posix_setrlimit throws a ValueError + when the hard_limit or soft_limit arguments are lower than -1 or + if soft_limit is greater than hard_limit. + + + + Session @@ -372,6 +397,13 @@ instead of silently failing. + + session_start is stricter in regard to the options + argument. It throws a ValueError if the array is + not a hashmap, or a TypeError if the + read_and_close value is not a valid type compatible with int. + + @@ -385,6 +417,25 @@ + + SNMP + + + snmpget, + snmpset, + snmp2_get, + snmp2_set, + snmp3_get, + snmp3_set + and SNMP::__construct throw a + ValueError when the hostname + is too large, contains any null byte or if the port is given + when negative or greater than 65535, timeout and retries values + are lower than -1 or too large. + + + + SOAP @@ -400,6 +451,38 @@ + + Sockets + + + socket_create_listen, + socket_bind and socket_sendto + throw a ValueError if the port is lower than 0 + or greater than 65535, and also if any of the hints array entries are + indexed numerically. + + + + socket_addrinfo_lookup throws a + TypeError if any of the hints values cannot be cast + to int and can throw a ValueError if any of these + values overflow. + + + + socket_set_option with + MCAST_LEAVE_GROUP/MCAST_LEAVE_SOURCE_GROUP + options will throw an exception if the value isn't a valid object or array. + + + + socket_set_option with multicast context throws a + ValueError when the created socket is not of + AF_INET/AF_INET6 family. + + + + SPL @@ -428,6 +511,21 @@ + + Tidy + + + tidy::__construct, + tidy::parseFile, + tidy::parseString now throws a + ValueError if the configuration contains an + invalid value or attempts to set a read-only internal entry, + and a TypeError if a configuration key is not a + string. + + + +