diff --git a/.github/nightly_matrix.php b/.github/nightly_matrix.php index 311176ef5e53e..846c60e8fd56d 100644 --- a/.github/nightly_matrix.php +++ b/.github/nightly_matrix.php @@ -1,7 +1,8 @@ 'master', 'version' => [8, 5]], + ['ref' => 'master', 'version' => [8, 6]], + ['ref' => 'PHP-8.5', 'version' => [8, 5]], ['ref' => 'PHP-8.4', 'version' => [8, 4]], ['ref' => 'PHP-8.3', 'version' => [8, 3]], ['ref' => 'PHP-8.2', 'version' => [8, 2]], diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 31d893e8d42a8..caaca316575e7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -357,7 +357,8 @@ Currently, we have the following branches in use: | Branch | | | --------- | --------- | -| master | Active development branch for PHP 8.5, which is open for backwards incompatible changes and major internal API changes. | +| master | Active development branch for PHP 8.6, which is open for backwards incompatible changes and major internal API changes. | +| PHP-8.5 | Is used to release the PHP 8.5.x series. This is a current stable version and is open for bugfixes only. | | PHP-8.4 | Is used to release the PHP 8.4.x series. This is a current stable version and is open for bugfixes only. | | PHP-8.3 | Is used to release the PHP 8.3.x series. This is a current stable version and is open for bugfixes only. | | PHP-8.2 | Is used to release the PHP 8.2.x series. This is an old stable version and is open for security fixes only. | diff --git a/NEWS b/NEWS index b8e04d9d018ba..285c4e78e3318 100644 --- a/NEWS +++ b/NEWS @@ -1,766 +1,5 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.5.0RC1 - -- Core: - . Fixed bug GH-19765 (object_properties_load() bypasses readonly property - checks). (timwolla) - . The __sleep() and __wakeup() magic methods have been deprecated. (Girgias) - . Fixed hard_timeout with --enable-zend-max-execution-timers. (Appla) - . Fixed bug GH-19839 (Incorrect HASH_FLAG_HAS_EMPTY_IND flag on userland - array). (ilutov) - . Fixed bug GH-19823 (register_argc_argv deprecation emitted twice when - using OPcache). (timwolla) - . Fixed bug GH-19480 (error_log php.ini cannot be unset when open_basedir is - configured). (nielsdos) - . Fixed bug GH-19719 (Allow empty statements before declare(strict_types)). - (nielsdos) - . Casting floats that are not representable as ints now emits a warning. - (Girgias) - . Casting NAN to other types now emits a warning. (Girgias) - -- Bz2: - . Fixed bug GH-19810 (Broken bzopen() stream mode validation). (ilutov) - -- Curl: - . Fix cloning of CURLOPT_POSTFIELDS when using the clone operator instead - of the curl_copy_handle() function to clone a CurlHandle. (timwolla) - -- Date: - . Fixed GH-17159: "P" format for ::createFromFormat swallows string literals. - (nielsdos) - . The __wakeup() magic method of DateTimeInterface, DateTime, - DateTimeImmutable, DateTimeZone, DateInterval, and DatePeriod has been - deprecated in favour of the __unserialize() magic method. (Girgias) - -- Exif: - . Fix OSS-Fuzz #442954659 (zero-size box in HEIF file causes infinite loop). - (nielsdos) - . Fix OSS-Fuzz #442954659 (Crash in exif_scan_HEIF_header). (nielsdos) - . Various hardening fixes to HEIF parsing. (nielsdos) - -- FPM: - . Fixed GH-8157 (post_max_size evaluates .user.ini too late in php-fpm). - (Jakub Zelenka) - -- Iconv: - . Extends the ICONV_CONST preprocessor for illumos/solaris. (jMichaelA) - -- Opcache: - . Fixed bug GH-19669 (assertion failure in zend_jit_trace_type_to_info_ex). - (Arnaud) - . Fixed bug GH-19831 (function JIT may not deref property value). (Arnaud) - -- OpenSSL: - . Fixed build when --with-openssl-legacy-provider set. (Jakub Zelenka) - -- MBstring: - . Updated Unicode data tables to Unicode 17.0. (Yuya Hamada) - -- Reflection: - . ReflectionConstant is no longer final. (sasezaki) - -- SAPI: - . Fixed bug GH-18582 and #81451: http_response_code() does not override the - status code generated by header(). (ilutov, Jakub Zelenka) - -- Standard: - . Passing strings which are not one byte long to ord() is now deprecated. - (Girgias) - . Fixed bug GH-19801 (leaks in var_dump() and debug_zval_dump()). - (alexandre-daubois) - . Fixed GH-14402 (SplPriorityQueue, SplMinHeap, and SplMaxHeap lost their - data on serialize()). (alexandre-daubois) - -- URI: - . Fixed bug GH-19780 (InvalidUrlException should check $errors argument). - (nielsdos) - . Prevent modifying Uri\WhatWg\Url and Uri\Rfc3986\Uri objects by manually - calling __construct() or __unserialize(). (timwolla) - . Add new Uri\UriError exception that is thrown for internal error - conditions. (timwolla) - . Further clean up the internal API. (timwolla) - . Fixed bug GH-19892 (Refcounting on zend_empty_array). (ilutov, timwolla) - . Fixed handling of port numbers > 65535 with the internal - `php_uri_parse_to_struct()` API. (timwolla) - -- Windows: - . Fix GH-19722 (_get_osfhandle asserts in debug mode when given a socket). - (dktapps) - -11 Sep 2025, PHP 8.5.0beta3 - -- Core: - . Destructing non-array values (other than NULL) using [] or list() now - emits a warning. (Girgias) - . Fixed bug GH-19637 (Incorrect Closure scope for FCC in constant - expression). (timwolla) - . Fixed bug GH-19613 (Stale array iterator pointer). (ilutov) - . Fixed bug GH-19679 (zend_ssa_range_widening may fail to converge). (Arnaud) - . Using null as an array offset or when calling array_key_exists() is now - deprecated. (alexandre-daubois) - . Fixed bug GH-19681 (PHP_EXPAND_PATH broken with bash 5.3.0). (Remi) - . Marks the stack as non-executable on Haiku. (David Carlier) - . Deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string is - now deprecated. (timwolla, nicolasgrekas) - -- CLI: - . Fixed bug GH-19461 (Improve error message on listening error with IPv6 - address). (alexandre-daubois) - -- Date: - . Fixed date_sunrise() and date_sunset() with partial-hour UTC offset. - (ilutov) - -- EXIF: - . Added support to retrieve Exif from HEIF file. (Benstone Zhang) - -- FPM: - . Fixed failed debug assertion when php_admin_value setting fails. (ilutov) - -- Filter: - . Fixed bug GH-16993 (filter_var_array with FILTER_VALIDATE_INT|FILTER_NULL_ON_FAILURE - should emit warning for invalid filter usage). (alexandre-daubois) - -- Intl: - . Added grapheme_strpos(), grapheme_stripos(), grapheme_strrpos(), - grapheme_strripos(), grapheme_strstr(), grapheme_stristr() and - grapheme_levenshtein() functions add $locale parameter (Yuya Hamada). - . Fixed bug GH-11952 (Fix locale strings canonicalization for IntlDateFormatter - and NumberFormatter). (alexandre-daubois) - -- ODBC: - . Removed driver-specific build flags and support. (Calvin Buckley) - -- Opcache: - . Fixed bug GH-19486 (Incorrect opline after deoptimization). (Arnaud) - . Fixed bug GH-19601 (Wrong JIT stack setup on aarch64/clang). (Arnaud) - . Fixed bug GH-19388 (Broken opcache.huge_code_pages). (Arnaud) - . Fixed bug GH-19657 (Build fails on non-glibc/musl/freebsd/macos/win - platforms). (Arnaud) - -- PCRE: - . Upgraded to pcre2lib from 10.45 to 10.46. (nielsdos) - -- PDO: - . Driver specific methods in the PDO class are now deprecated. (Arnaud) - -- PDO_SQLITE: - . Add PDO\Sqlite::ATTR_TRANSACTION_MODE connection attribute. - (Samuel Štancl) - -- Reflection: - . Fix GH-19691 (getModifierNames() not reporting asymmetric visibility). - (DanielEScherzer) - -- Session: - . Fix RC violation of session SID constant deprecation attribute. (ilutov) - -- Standard: - . Fix GH-19610 (Deprecation warnings in functions taking as argument). - (Girgias) - . Fixed bug GH-19577 (Avoid integer overflow when using a small offset - and PHP_INT_MAX with LimitIterator). (alexandre-daubois) - . Implement GH-19188: Add support for new INI mail.cr_lf_mode. - (alexandre-daubois) - -- Streams: - . Fixed bug GH-14506 (Closing a userspace stream inside a userspace handler - causes heap corruption). (nielsdos) - . Avoid double conversion to string in php_userstreamop_readdir(). (nielsdos) - -- URI: - . Added support for Uri\Rfc3986\Uri::with*() methods. (kocsismate) - . Fixed memory management of Uri\WhatWg\Url objects. (timwolla) - . Fixed memory management of the internal "parse_url" URI parser. - (timwolla) - . Fixed double-free when assigning to $errors fails when using - the Uri\WhatWg\Url parser. (timwolla) - . Reject out-of-range ports when using the Uri\Rfc3986\Uri parser. - (timwolla) - . Return null instead of 0 for Uri\Rfc3986\Uri::getPort() when the - URI contains an empty port. (timwolla) - . Fixed creation of the InvalidUrlException when not passing an - errors zval to the internal whatwg parser. (timwolla) - . Clean up naming of internal API. (timwolla) - -28 Aug 2025, PHP 8.5.0beta2 - -- Core: - . Fixed bug GH-18850 (Repeated inclusion of file with __halt_compiler() - triggers "Constant already defined" warning). (ilutov) - . Fixed bug GH-19476 (pipe operator fails to correctly handle returning - by reference). (alexandre-daubois) - . The report_memleaks INI directive has been deprecated. (alexandre-daubois) - . Constant redeclaration has been deprecated. (alexandre-daubois) - . Fixed OSS-Fuzz #439125710 (Pipe cannot be used in write context). - (nielsdos) - . Added support for configuring the URI parser for the FTP/FTPS as well as - the SSL/TLS stream wrappers as described in - https://wiki.php.net/rfc/url_parsing_api#plugability. (kocsismate) - . Fixed bug GH-19548 (Shared memory violation on property inheritance). - (alexandre-daubois) - . Fixed bug GH-19544 (GC treats ZEND_WEAKREF_TAG_MAP references as WeakMap - references). (Arnaud, timwolla) - . Introduced the TAILCALL VM, enabled by default when compiling with Clang>=19 - on x86_64 or aarch64. (Arnaud) - . Enacted the follow-up phase of the "Path to Saner Increment/Decrement - operators" RFC, meaning that incrementing non-numeric strings is now - deprecated. (Girgias). - . Various closure binding issues are now deprecated. (alexandre-daubois) - . Fixed bug GH-18373 (Don't substitute self/parent with anonymous class). - (ilutov) - . Prohibit pipe & arrow function combination that leads to confusing parse - trees. (ilutov) - . The disable_classes INI directive has been removed. (Girgias) - . The locally predefined variable $http_response_header is deprecated. - (Girgias) - -- Filter: - . Added support for configuring the URI parser for FILTER_VALIDATE_URL - as described in https://wiki.php.net/rfc/url_parsing_api#plugability. - (kocsismate) - -- ODBC: - . Remove ODBCVER and assume ODBC 3.5. (Calvin Buckley) - -- Opcache: - . Fixed bug GH-19493 (JIT variable not stored before YIELD). (Arnaud) - -- OpenSSL: - . Implement #81724 (openssl_cms_encrypt only allows specific ciphers). - (Jakub Zelenka) - -- PDO: - . Driver specific constants in the PDO class are now deprecated. (Arnaud) - -- Phar: - . Fixed memory leaks when verifying OpenSSL signature. (Girgias) - -- Session: - . Added support for partitioned cookies. (nielsdos) - -- SOAP: - . Added support for configuring the URI parser for SoapClient::_doRequest() - as described in https://wiki.php.net/rfc/url_parsing_api#plugability. - (kocsismate) - -- SPL: - . Deprecate ArrayObject and ArrayIterator with objects. (Girgias) - -- Standard: - . Fixed bug GH-16649 (UAF during array_splice). (alexandre-daubois) - . Passing integers outside the interval [0, 255] to chr() is now deprecated. - (Girgias) - . Added support for partitioned cookies. (nielsdos) - -- Tokenizer: - . Fixed bug GH-19507 (Corrupted result after recursive tokenization during - token_get_all()). (kubawerlos, nielsdos, Arnaud) - -- URI: - . Clean up naming of internal API (header names, symbol names). - (Máté Kocsis, timwolla) - -14 Aug 2025, PHP 8.5.0beta1 - -- Core: - . Non-canonical cast names (boolean), (integer), (double), and (binary) have - been deprecated. (Girgias) - . The $exclude_disabled parameter of the get_defined_functions() function has - been deprecated, as it no longer has any effect since PHP 8.0. (Girgias) - . Terminating case statements with a semicolon instead of a colon has - been deprecated. (theodorejb) - . The backtick operator as an alias for shell_exec() has been deprecated. - (timwolla) - . Returning null from __debugInfo() has been deprecated. (DanielEScherzer) - . Support #[\Override] on properties. (Jiří Pudil) - -- Curl: - . The curl_close() function has been deprecated. (DanielEScherzer) - . The curl_share_close() function has been deprecated. (DanielEScherzer) - -- Date: - . The DATE_RFC7231 and DateTimeInterface::RFC7231 constants have been - deprecated. (jorgsowa) - -- DOM: - . Fixed bug GH-18877 (\Dom\HTMLDocument querySelectorAll selecting only the - first when using ~ and :has). (nielsdos, lexborisov) - -- FileInfo - . The finfo_close() function has been deprecated. (timwolla) - . The $context parameter of the finfo_buffer() function has been deprecated - as it is ignored. (Girgias) - -- GD: - . The imagedestroy() function has been deprecated. (DanielEScherzer) - -- 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. (Girgias) - . The intl.error_level INI setting has been deprecated. (Girgias) - -- MySQLi: - . The mysqli_execute() alias function has been deprecated. (timwolla) - -- OpenSSL: - . Fixed bug GH-19369 (8.5 | Regression in openssl_sign() - support for alias - algorithms appears to be broken). (Jakub Zelenka) - . The $key_length parameter for openssl_pkey_derive() has been deprecated. - (Girgias) - . Implement #80495 (Enable to set padding in openssl_(sign|verify). - (Jakub Zelenka) - . Implement #47728 (openssl_pkcs7_sign ignores new openssl flags). - (Jakub Zelenka) - -- PDO: - . The "uri:" DSN scheme has been deprecated due to security concerns with - DSNs coming from remote URIs. (timwolla) - -- Reflection: - . Fixed bug GH-17927 (Reflection: have some indication of property hooks in - `_property_string()`). (DanielEScherzer) - . The setAccessible() methods of various Reflection objects have been - deprecated, as those no longer have an effect. (timwolla) - . ReflectionClass::getConstant() for constants that do not exist has been - deprecated. (DanielEScherzer) - . ReflectionProperty::getDefaultValue() for properties without default values - has been deprecated. (DanielEScherzer) - -- 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. (Girgias) - . The SplObjectStorage::contains(), SplObjectStorage::attach(), and - SplObjectStorage::detach() methods have been deprecated in favour of - SplObjectStorage::offsetExists(), SplObjectStorage::offsetSet(), and - SplObjectStorage::offsetUnset() respectively. (Girgias) - -- Standard: - . The socket_set_timeout() alias function has been deprecated. (timwolla) - . Passing null to to readdir(), rewinddir(), and closedir() to use the last - opened directory has been deprecated. (Girgias) - . Fixed bug GH-19153 (#[\Attribute] validation should error on - trait/interface/enum/abstract class). (DanielEScherzer) - -- XML: - . The xml_parser_free() function has been deprecated. (DanielEScherzer) - -31 Jul 2025, PHP 8.5.0alpha4 - -- Core: - . Add clone-with support to the clone() function. (timwolla, edorian) - . Fix support for non-userland stream notifiers. (timwolla) - . Added PHP_BUILD_PROVIDER constant. (timwolla) - . Fixed bug GH-19305 (Operands may be being released during comparison). - (Arnaud) - . Fixed bug GH-19306 (Generator can be resumed while fetching next value from - delegated Generator). (Arnaud) - . Fixed bug GH-19326 (Calling Generator::throw() on a running generator with - a non-Generator delegate crashes). (Arnaud) - -- Curl: - . Add support for CURLINFO_CONN_ID in curl_getinfo() (thecaliskan) - . Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() (thecaliskan) - . Add support for CURLOPT_SSL_SIGNATURE_ALGORITHMS. (Ayesh Karunaratne) - -- FPM: - . Make FPM access log limit configurable using log_limit. (Jakub Zelenka) - -- GD: - . Fix incorrect comparison with result of php_stream_can_cast(). (Girgias) - -- Intl: - . Fix return value on failure for resourcebundle count handler. (Girgias) - . Fixed bug GH-19307 (PGO builds of shared ext-intl are broken). (cmb) - -- OPcache: - . Disallow changing opcache.memory_consumption when SHM is already set up. - (timwolla) - . Fixed bug GH-15074 (Compiling opcache statically into ZTS PHP fails). - (Arnaud) - . Make OPcache non-optional (Arnaud, timwolla) - . Fixed bug GH-17422 (OPcache bypasses the user-defined error handler for - deprecations). (Arnaud, timwolla) - . Fixed bug GH-19301 (opcache build failure). (Remi) - -- OpenSSL: - . Add $digest_algo parameter to openssl_public_encrypt() and - openssl_private_decrypt() functions. (Jakub Zelenka) - -- POSIX: - . posix_kill and posix_setpgid throws a ValueError on invalid process_id. - (David Carlier) - . posix_setpgid throws a ValueError on invalid process_group_id, - posix_setrlimit throws a ValueError on invalid soft_limit and hard_limit - arguments. (David Carlier) - -- Reflection: - . Fixed bug GH-19187 (ReflectionNamedType::getName() prints nullable type when - retrieved from ReflectionProperty::getSettableType()). (ilutov) - -- Session: - . Fixed GH-19197: build broken with ZEND_STRL usage with memcpy - when implemented as macro. (David Carlier) - -- Soap: - . Fixed bug GH-19226 (Segfault when spawning new thread in soap extension). - (Florian Engelhardt) - -- Sockets: - . socket_set_option for multicast context throws a ValueError - when the socket family is not of AF_INET/AF_INET6 family. (David Carlier) - -- Standard: - . Add HEIF/HEIC support to getimagesize. (Benstone Zhang) - . Implement #71517 (Implement SVG support for getimagesize() and friends). - (nielsdos) - . Optimized PHP html_entity_decode function. (Artem Ukrainskiy) - . Minor optimization to array_chunk(). (nielsdos) - -- URI: - . Empty host handling is fixed. (Máté Kocsis) - . Error handling of Uri\WhatWg\Url::withHost() is fixed when the input - contains a port. Now, it triggers an exception; previously, the error - was silently swallowed. (Máté Kocsis) - . Support empty URIs with Uri\Rfc3986\Uri. (timwolla) - -17 Jul 2025, PHP 8.5.0alpha2 - -- Core: - . Fix OSS-Fuzz #427814452 (pipe compilation fails with assert). - (nielsdos, ilutov) - -- DOM: - . Make cloning DOM node lists, maps, and collections fail. (nielsdos) - . Added Dom\Element::getElementsByClassName(). (nielsdos) - -- PDO_ODBC - . Fetch larger block sizes and better handle SQL_NO_TOTAL when calling - SQLGetData. (Calvin Buckley, Saki Takamachi) - -- Standard: - . Optimized pack(). (nielsdos, divinity76) - . Fixed bug GH-19070 (setlocale($type, NULL) should not be deprecated). - (nielsdos) - -- URI: - . Return the singleton UrlValidationErrorType instances from Uri\WhatWg\Url - instead of creating new objects that are different from the singleton. - (timwolla) - -03 Jul 2025, PHP 8.5.0alpha1 - -- BCMath: - . Simplify `bc_divide()` code. (SakiTakamachi) - . If the result is 0, n_scale is set to 0. (SakiTakamachi) - . If size of BC_VECTOR array is within 64 bytes, stack area is now used. - (SakiTakamachi) - -- CLI: - . Add --ini=diff to print INI settings changed from the builtin default. - (timwolla) - . Drop support for -z CLI/CGI flag. (nielsdos) - . Fixed GH-17956 - development server 404 page does not adapt to mobiles. - (pascalchevrel) - -- CURL: - . Added CURLFOLLOW_ALL, CURLFOLLOW_OBEYCODE and CURLFOLLOW_FIRSTONLY - values for CURLOPT_FOLLOWLOCATION curl_easy_setopt option. (David Carlier) - -- COM: - . Fixed property access of PHP objects wrapped in variant. (cmb) - . Fixed method calls for PHP objects wrapped in variant. (cmb) - -- Core: - . Fixed bug GH-16665 (\array and \callable should not be usable in - class_alias). (nielsdos) - . Added PHP_BUILD_DATE constant. (cmb) - . Added support for Closures and first class callables in constant - expressions. (timwolla, Volker Dusch) - . Use `clock_gettime_nsec_np()` for high resolution timer on macOS - if available. (timwolla) - . Implement GH-15680 (Enhance zend_dump_op_array to properly represent - non-printable characters in string literals). (nielsdos, WangYihang) - . Add support for backtraces for fatal errors. (enorris) - . Fixed bug GH-17442 (Engine UAF with reference assign and dtor). (nielsdos) - . Improved error message of UnhandledMatchError for - zend.exception_string_param_max_len=0. (timwolla) - . Fixed bug GH-17959 (Relax missing trait fatal error to error exception). - (ilutov) - . Fixed bug GH-18033 (NULL-ptr dereference when using register_tick_function - in destructor). (nielsdos) - . Fixed bug GH-18026 (Improve "expecting token" error for ampersand). (ilutov) - . Added the #[\NoDiscard] attribute to indicate that a function's return - value is important and should be consumed. (timwolla, Volker Dusch) - . Added the (void) cast to indicate that not using a value is intentional. - (timwolla, Volker Dusch) - . Added get_error_handler(), get_exception_handler() functions. (Arnaud) - . Fixed bug GH-15753 and GH-16198 (Bind traits before parent class). (ilutov) - . Added support for casts in constant expressions. (nielsdos) - . Fixed bugs GH-17711 and GH-18022 (Infinite recursion on deprecated attribute - evaluation) and GH-18464 (Recursion protection for deprecation constants not - released on bailout). (DanielEScherzer and ilutov) - . Fixed AST printing for immediately invoked Closure. (Dmitrii Derepko) - . Properly handle __debugInfo() returning an array reference. (nielsdos) - . Properly handle reference return value from __toString(). (nielsdos) - . Added the pipe (|>) operator. (crell) - . Added support for `final` with constructor property promotion. - (DanielEScherzer) - . Do not use RTLD_DEEPBIND if dlmopen is available. (Daniil Gentili) - . Make `clone()` a function. (timwolla, edorian) - . Fixed bug GH-19081 (Wrong lineno in property error with constructor property - promotion). (ilutov) - -- Curl: - . Added curl_multi_get_handles(). (timwolla) - . Added curl_share_init_persistent(). (enorris) - . Added CURLINFO_USED_PROXY, CURLINFO_HTTPAUTH_USED, and CURLINFO_PROXYAUTH_USED - support to curl_getinfo. (Ayesh Karunaratne) - -- Date: - . Fix undefined behaviour problems regarding integer overflow in extreme edge - cases. (nielsdos, cmb, ilutov) - -- DOM: - . Added Dom\Element::$outerHTML. (nielsdos) - . Added Dom\Element::insertAdjacentHTML(). (nielsdos) - . Added $children property to ParentNode implementations. (nielsdos) - -- Enchant: - . Added enchant_dict_remove_from_session(). (nielsdos) - . Added enchant_dict_remove(). (nielsdos) - . Fix missing empty string checks. (nielsdos) - -- EXIF: - . Add OffsetTime* Exif tags. (acc987) - -- Fileinfo: - . Upgrade to file 5.46. (nielsdos) - . Change return type of finfo_close() to true. (timwolla) - -- FPM: - . Fixed GH-17645 (FPM with httpd ProxyPass does not decode script path). - (Jakub Zelenka) - -- GD: - . Fixed bug #68629 (Transparent artifacts when using imagerotate). (pierre, - cmb) - . Fixed bug #64823 (ZTS GD fails to to find system TrueType font). (cmb) - -- Intl: - . Bumped ICU requirement to ICU >= 57.1. (cmb) - . IntlDateFormatter::setTimeZone()/datefmt_set_timezone() throws an exception - with uninitialised classes or clone failure. (David Carlier) - . Added DECIMAL_COMPACT_SHORT/DECIMAL_COMPACT_LONG for NumberFormatter class. - (BogdanUngureanu) - . Added Locale::isRightToLeft to check if a locale is written right to left. - (David Carlier) - . Added null bytes presence in locale inputs for Locale class. (David Carlier) - . Added grapheme_levenshtein() function. (Yuya Hamada) - . Added Locale::addLikelySubtags/Locale::minimizeSubtags to handle - adding/removing likely subtags to a locale. (David Carlier) - . Added IntlListFormatter class to format a list of items with a locale, - operands types and units. (BogdanUngureanu) - . Fixed bug GH-18566 ([intl] Weird numeric sort in Collator). (nielsdos) - -- LDAP: - . Allow ldap_get_option to retrieve global option by allowing NULL for - connection instance ($ldap). (Remi) - -- MySQLi: - . Fixed bugs GH-17900 and GH-8084 (calling mysqli::__construct twice). - (nielsdos) - -- MySQLnd: - . Added mysqlnd.collect_memory_statistics to ini quick reference. - (hauk92) - -- Opcache: - . Fixed ZTS OPcache build on Cygwin. (cmb) - . Added opcache.file_cache_read_only. (Samuel Melrose) - . Updated default value of opcache.jit_hot_loop. (Arnaud) - . Log a warning when opcache lock file permissions could not be changed. - (Taavi Eomäe) - -- OpenSSL: - . Added openssl.libctx INI that allows to select the OpenSSL library context - type and convert various parts of the extension to use the custom libctx. - (Jakub Zelenka) - -- Output: - . Fixed calculation of aligned buffer size. (cmb) - -- PCNTL: - . Extend pcntl_waitid with rusage parameter. (vrza) - -- PCRE: - . Upgraded to pcre2lib from 10.44 to 10.45. (nielsdos) - . Remove PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK from pcre compile options. - (mvorisek) - -- PDO_PGSQL: - . Added Iterable support for PDO::pgsqlCopyFromArray. (KentarouTakeda) - . Implement GH-15387 Pdo\Pgsql::setAttribute(PDO::ATTR_PREFETCH, 0) or - Pdo\Pgsql::prepare(…, [ PDO::ATTR_PREFETCH => 0 ]) make fetch() lazy - instead of storing the whole result set in memory (Guillaume Outters) - -- PDO_SQLITE: - . throw on null bytes / resolve GH-13952 (divinity76). - . Implement GH-17321: Add setAuthorizer to Pdo\Sqlite. (nielsdos) - . PDO::sqliteCreateCollation now throws a TypeError if the callback - has a wrong return type. (David Carlier) - . Added Pdo_Sqlite::ATTR_BUSY_STATEMENT constant to check - if a statement is currently executing. (David Carlier) - . Added Pdo_Sqlite::ATTR_EXPLAIN_STATEMENT constant to set a statement - in either EXPLAIN_MODE_PREPARED, EXPLAIN_MODE_EXPLAIN, - EXPLAIN_MODE_EXPLAIN_QUERY_PLAN modes. (David Carlier) - -- PGSQL: - . Added pg_close_stmt to close a prepared statement while allowing - its name to be reused. (David Carlier) - . Added Iterable support for pgsql_copy_from. (David Carlier) - . pg_connect checks if connection_string contains any null byte, - pg_close_stmt check if the statement contains any null byte. - (David Carlier) - . Added pg_service to get the connection current service identifier. - (David Carlier) - -- POSIX: - . Added POSIX_SC_OPEN_MAX constant to get the number of file descriptors - a process can handle. (David Carlier) - . posix_ttyname() sets last_error to EBADF on invalid file descriptors, - posix_isatty() raises E_WARNING on invalid file descriptors, - posix_fpathconf checks invalid file descriptors. (David Carlier) - -- Random: - . Moves from /dev/urandom usage to arc4random_buf on Haiku. (David Carlier) - -- Reflection: - . Added ReflectionConstant::getExtension() and ::getExtensionName(). - (DanielEScherzer) - . Fixed bug GH-12856 (ReflectionClass::getStaticPropertyValue() returns UNDEF - zval for uninitialized typed properties). (nielsdos) - . Fixed bug GH-15766 (ReflectionClass::__toString() should have better output - for enums). (DanielEScherzer) - . Added ReflectionProperty::getMangledName() method. (alexandre-daubois) - -- Session: - . session_start() throws a ValueError on option argument if not a hashmap - or a TypeError if read_and_close value is not compatible with int. - (David Carlier) - -- SimpleXML: - . Fixed bug GH-12231 (SimpleXML xpath should warn when returning other return - types than node lists). (nielsdos) - -- SNMP: - . snmpget, snmpset, snmp_get2, snmp_set2, snmp_get3, snmp_set3 and - SNMP::__construct() throw an exception on invalid hostname, community - timeout and retries arguments. (David Carlier) - -- SOAP: - . Fixed bug #49169 (SoapServer calls wrong function, although "SOAP action" - header is correct). (nielsdos) - . Fix namespace handling of WSDL and XML schema in SOAP, - fixing at least GH-16320 and bug #68576. (nielsdos) - . Fixed bug #70951 (Segmentation fault on invalid WSDL cache). (nielsdos) - . Implement request #55503 (Extend __getTypes to support enumerations). - (nielsdos, datibbaw) - . Implement request #61105 (Support Soap 1.2 SoapFault Reason Text lang - attribute). (nielsdos) - -- Sockets: - . Added IPPROTO_ICMP/IPPROTO_ICMPV6 to create raw socket for ICMP usage. - (David Carlier) - . Added TCP_FUNCTION_BLK to change the TCP stack algorithm on FreeBSD. - (David Carlier) - . socket_set_option() catches possible overflow with SO_RCVTIMEO/SO_SNDTIMEO - with timeout setting on windows. (David Carlier) - . Added TCP_FUNCTION_ALIAS, TCP_REUSPORT_LB_NUMA, TCP_REUSPORT_LB_NUMA_NODOM, - TCP_REUSPORT_LB_CURDOM, TCP_BBR_ALGORITHM constants. - . socket_create_listen() throws an exception on invalid port value. - (David Carlier) - . socket_bind() throws an exception on invalid port value. - (David Carlier) - . socket_sendto() throws an exception on invalid port value. - (David Carlier) - . socket_addrinfo_lookup throws an exception on invalid hints value types. - (David Carlier) - . socket_addrinfo_lookup throws an exception if any of the hints value - overflows. (David Carlier) - . socket_addrinfo_lookup throws an exception if one or more hints entries - has an index as numeric. (David Carlier) - . socket_set_option with the options MCAST_LEAVE_GROUP/MCAST_LEAVE_SOURCE_GROUP - will throw an exception if its value is not a valid array/object. - (David Carlier) - . socket_getsockname/socket_create/socket_bind handled AF_PACKET family socket. - (David Carlier) - . Added IP_BINDANY for a socket to bind to any address. (David Carlier) - . Added SO_BUSY_POOL to reduce packets poll latency. (David Carlier) - - Added UDP_SEGMENT support to optimise multiple large datagrams over UDP - if the kernel and hardware supports it. (David Carlier) - - Added SHUT_RD, SHUT_WR and SHUT_RDWR constants for socket_shutdown(). - (David Carlier) - -- Sodium: - . Fix overall theoretical overflows on zend_string buffer allocations. - (David Carlier/nielsdos) - -- Sqlite: - . Added Sqlite3Stmt::busy to check if a statement is still being executed. - (David Carlier) - . Added Sqlite3Stmt::explain to produce a explain query plan from - the statement. (David Carlier) - . Added Sqlite3Result::fetchAll to returns all results at once from a query. - (David Carlier) - -- Standard: - . Fixed crypt() tests on musl when using --with-external-libcrypt - (Michael Orlitzky). - . Fixed bug GH-18062 (is_callable(func(...), callable_name: $name) for first - class callables returns wrong name). (timwolla) - . Added array_first() and array_last(). (nielsdos) - . Fixed bug GH-18823 (setlocale's 2nd and 3rd argument ignores strict_types). - (nielsdos) - . Fixed exit code handling of sendmail cmd and added warnings. - (Jesse Hathaway) - . Fixed bug GH-18897 (printf: empty precision is interpreted as precision 6, - not as precision 0). (nielsdos) - -- Streams: - . Fixed bug GH-16889 (stream_select() timeout useless for pipes on Windows). - (cmb) - -- Tests: - . Allow to shuffle tests even in non-parallel mode. (dhuang00) - -- Tidy: - . tidy::__construct/parseFile/parseString methods throw an exception if - the configuration argument is invalid. (David Carlier) - -- Windows: - . Fixed bug GH-10992 (Improper long path support for relative paths). (cmb, - nielsdos) - . Fixed bug GH-16843 (Windows phpize builds ignore source subfolders). (cmb) - -- XMLWriter: - . Improved performance and reduce memory consumption. (nielsdos) - -- XSL: - . Implement request #30622 (make $namespace parameter functional). (nielsdos) - -- Zlib: - . gzfile, gzopen and readgzfile, their "use_include_path" argument - is now a boolean. (David Carlier) - . Fixed bug GH-16883 (gzopen() does not use the default stream context when - opening HTTP URLs). (nielsdos) - . Implemented GH-17668 (zlib streams should support locking). (nielsdos) - +?? ??? ????, PHP 8.6.0alpha1 <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> diff --git a/UPGRADING b/UPGRADING index 80c286cae5a19..2431add112afa 100644 --- a/UPGRADING +++ b/UPGRADING @@ -1,4 +1,4 @@ -PHP 8.5 UPGRADE NOTES +PHP 8.6 UPGRADE NOTES 1. Backward Incompatible Changes 2. New Features @@ -19,801 +19,30 @@ PHP 8.5 UPGRADE NOTES 1. Backward Incompatible Changes ======================================== -- Core: - . It is no longer possible to use "array" and "callable" as class alias names - in class_alias(). - . 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. - . The return value of gc_collect_cycles() no longer includes strings and - resources that were indirectly collected through cycles. - . It is now allowed to substitute static with self or the concrete class name - in final subclasses. - . The tick handlers are now deactivated after all shutdown functions, destructors - have run and the output handlers have been cleaned up. - This is a consequence of fixing GH-18033. - . Traits are now bound before the parent class. This is a subtle behavioral - change, but should more closely match user expectations, demonstrated by - GH-15753 and GH-16198. - . 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 handlers when handling class linking - errors are not promoted to fatal errors anymore and do not prevent linking. - . 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. - . The disable_classes INI setting has been removed as it causes various - engine assumptions to be broken. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#remove_disable_classes_ini_setting - . Destructing non-array values (other than NULL) using [] or list() now - emits a warning. - RFC: https://wiki.php.net/rfc/warnings-php-8-5#destructuring_non-array_values - . 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. - RFC: https://wiki.php.net/rfc/warnings-php-8-5#casting_out_of_range_floats_to_int - . A warning is now emitted when casting NAN to other types. - RFC: https://wiki.php.net/rfc/warnings-php-8-5#coercing_nan_to_other_types - -- BZ2: - . 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. - This is a consequence of fixing bug GH-18566. - -- 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 --enable-opcache/--disable-opcache 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 ValueErrors when entries of the $args parameter - contain null bytes. - . pcntl_exec() now throws ValueErrors 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. - https://github.com/PCRE2Project/pcre2/issues/736#issuecomment-2754024651 - -- 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. See GH-18897. - ======================================== 2. New Features ======================================== -- Core: - . Closure is now a proper subtype of callable - . Added support for Closures and first class callables in constant - expressions. - RFC: https://wiki.php.net/rfc/closures_in_const_expr - RFC: https://wiki.php.net/rfc/fcc_in_const_expr - . Fatal Errors (such as an exceeded maximum execution time) now include a - backtrace. - RFC: https://wiki.php.net/rfc/error_backtraces_v2 - . Added the #[\NoDiscard] attribute to indicate that a function's return - value is important and should be consumed. - RFC: https://wiki.php.net/rfc/marking_return_value_as_important - . 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. - RFC: https://wiki.php.net/rfc/marking_return_value_as_important - . Added asymmetric visibility support for static properties. - RFC: https://wiki.php.net/rfc/static-aviz - . Added support for casts in constant expressions. - . Added support for attributes on compile-time non-class constants. - RFC: https://wiki.php.net/rfc/attributes-on-constants - . The #[\Deprecated] attribute can now be used on constants. - RFC: https://wiki.php.net/rfc/attributes-on-constants - . Added the pipe (|>) operator. - RFC: https://wiki.php.net/rfc/pipe-operator-v3 - . Constructor property promotion can now be used for final properties. - RFC: https://wiki.php.net/rfc/final_promotion - . #[\Override] can now be applied to properties. - RFC: https://wiki.php.net/rfc/override_properties - . The #[\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. - RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute - -- Curl: - . Added support for share handles that are persisted across multiple PHP - requests, safely allowing for more effective connection reuse. - RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement - . 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_easy_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_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: - . Add OffsetTime* Exif tags. - . Added support for HEIF/HEIC. - -- 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. - RFC: https://wiki.php.net/rfc/CHIPS - -- SOAP: - . Enumeration cases are now dumped in __getTypes(). - . Implemented request #61105: - 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. - -- Sqlite: - . Added class constants Sqlite3Stmt::EXPLAIN_MODE_PREPARED, - Sqlite3Stmt::EXPLAIN_MODE_EXPLAIN and - Sqlite3Stmt::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN. - -- 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. - RFC: https://wiki.php.net/rfc/CHIPS - -- 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. - ======================================== 3. Changes in SAPI modules ======================================== -- 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 --ini=diff option to print INI settings changed from the builtin - default. - -- FPM: - . FPM with httpd ProxyPass 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. - ======================================== 4. Deprecated Functionality ======================================== -- Core: - . 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. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4 - . 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. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4 - . Non-canonical cast names (boolean), (integer), (double), and (binary) have - been deprecated, use (bool), (int), (float), and (string) respectively. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_non-standard_cast_names - . The $exclude_disabled parameter of the get_defined_functions() function has - been deprecated, as it no longer has any effect since PHP 8.0. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_exclude_disabled_parameter_of_get_defined_functions - . Terminating case statements with a semicolon instead of a colon has - been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_semicolon_after_case_in_switch_statement - . The backtick operator as an alias for shell_exec() has been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_backticks_as_an_alias_for_shell_exec - . Returning null from __debugInfo() has been deprecated. - Return an empty array instead. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_debuginfo_returning_null - . The report_memleaks INI directive has been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_report_memleaks_ini_directive - . Constant redeclaration has been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_constant_redeclaration - . Enacted the follow-up phase of the "Path to Saner Increment/Decrement - operators" RFC, meaning that incrementing non-numeric strings is now - deprecated. Instead the str_increment() function should be used. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#enact_follow-up_phase_of_the_path_to_saner_incrementdecrement_operators_rfc - . 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 - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_closure_binding_issues - . Using null as an array offset or when calling array_key_exists() is now - deprecated. Instead an empty string should be used. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_using_values_null_as_an_array_offset_and_when_calling_array_key_exists - . 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. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_register_argc_argv_ini_directive - . The __sleep() and __wakeup() magic methods have been deprecated. The - __serialize() and __unserialize() magic methods should be used instead, - or at the same time if compatibility with PHP 7 is required. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_sleep_and_wakeup_magic_methods - -- Curl: - . The curl_close() function has been deprecated, as CurlHandle objects are - freed automatically. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_curl_close - . The curl_share_close() function has been deprecated, as CurlShareHandle - objects are freed automatically. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_curl_share_close - -- Date: - . The DATE_RFC7231 and DateTimeInterface::RFC7231 constants have been - deprecated. This is because the associated timezone is ignored and always - uses GMT. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_date_rfc7231_and_datetimeinterfacerfc7231 - . The __wakeup() magic method of DateTimeInterface, DateTime, - DateTimeImmutable, DateTimeZone, DateInterval, and DatePeriod has been - deprecated in favour of the __unserialize() magic method. - Related to RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_sleep_and_wakeup_magic_methods - -- FileInfo: - . The finfo_close() function has been deprecated. - As finfo objects are freed automatically. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_finfo_close - . The $context parameter of the finfo_buffer() function has been deprecated - as it is ignored. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_context_parameter_for_finfo_buffer - -- GD: - . The imagedestroy() function has been deprecated, as GdImage objects are - freed automatically. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_imagedestroy - -- Hash: - . The MHASH_* constants have been deprecated. These have been overlooked - when the mhash*() function family has been deprecated per - https://wiki.php.net/rfc/deprecations_php_8_1#mhash_function_family - -- 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. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_intlerror_level_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 - https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_building_ext_ldap_against_oracle_ldap - -- MySQLi: - . The mysqli_execute() alias function has been deprecated. - Use mysqli_stmt_execute() instead. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_mysqli_execute - -- 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. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_key_length_parameter_of_openssl_pkey_derive - -- PDO: - . The "uri:" DSN scheme has been deprecated due to security concerns with - DSNs coming from remote URIs. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_pdo_s_urischeme - . 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 - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_driver_specific_pdo_constants_and_methods - . 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() - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_driver_specific_pdo_constants_and_methods - -- 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. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#extpdo_deprecations - -- Reflection: - . The setAccessible() methods of various Reflection objects have been - deprecated, as those no longer have an effect. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionsetaccessible - . Calling ReflectionClass::getConstant() for constants that do not exist has - been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionclassgetconstant_for_missing_constants - . Calling ReflectionProperty::getDefaultValue() for properties without default - values has been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionpropertygetdefaultvalue_for_properties_without_default_values - -- 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. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_spl_autoload_call_to_spl_autoload_unregister - . The SplObjectStorage::contains(), SplObjectStorage::attach(), and - SplObjectStorage::detach() methods have been deprecated in favour of - SplObjectStorage::offsetExists(), SplObjectStorage::offsetSet(), and - SplObjectStorage::offsetUnset() respectively. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_splobjectstoragecontains_splobjectstorageattach_and_splobjectstoragedetach - . Using ArrayObject and ArrayIterator with objects has been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_arrayobject_and_arrayiterator_with_objects - -- Standard: - . The socket_set_timeout() alias function has been deprecated. - Use stream_set_timeout() instead. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_socket_set_timeout - . Passing null to to readdir(), rewinddir(), and closedir() to use the last - opened directory has been deprecated. Provide the last opened directory - explicitly instead. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_null_to_readdir_rewinddir_and_closedir - . 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. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_integers_outside_the_interval_0_255_to_chr - . Passing a string which is not a single byte to ord() is now deprecated, - this is indicative of a bug. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_string_which_are_not_one_byte_long_to_ord - . Relying locally predefined variable $http_response_header is deprecated. - Instead one should call the http_get_last_response_headers() function. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable - -- XML: - . The xml_parser_free() function has been deprecated, as XMLParser objects - are freed automatically. - RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_xml_parser_free - ======================================== 5. 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. - RFC: https://wiki.php.net/rfc/grapheme_add_locale_for_case_insensitive - -- LDAP: - . ldap_get_option() now accepts a NULL connection, as 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 new parameter - $digest_algo that allows specifying hash digest algorithm for OEAP padding. - . openssl_sign() and openssl_verify() have 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 also supports inputs as Iterable. - . Pdo\Pgsql::setAttribute and Pdo\Pgsql::prepare supports - PDO::ATTR_PREFETCH sets to 0 which set to 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. - -- PGSQL: - . pg_copy_from also supports inputs as Iterable. - . 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 supports the platform (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 supports the platform. - . posix_setrlimit throws a ValueError when the hard_limit of soft_limit - argument 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. - RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute - -- Session: - . session_start is stricter in regard to the option argument. - It throws a ValueError if the whole is not a hashmap or - a TypeError if read_and_close value is not a valid type - compatible with int. - -- SNMP: - . snmpget, snmpset, snmp_get2, snmp_set2, snmp_get3, snmp_set3 - 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/parseFile/parseString now throws a ValueError - if the configuration contains an invalid or set a read-only - internal entry, a TypeError contains, at least, one element - when the key is not a string. - -- Zlib: - . The "use_include_path" argument for the - gzfile, gzopen and readgzfile functions had been changed - from int to boolean. - . gzfile, gzopen and readgzfile functions now respect the default - stream context. - ======================================== 6. New Functions ======================================== -- Core: - . get_error_handler() allows retrieving the current user-defined error handler - function. - RFC: https://wiki.php.net/rfc/get-error-exception-handler - . get_exception_handler() allows retrieving the current user-defined exception - handler function. - RFC: https://wiki.php.net/rfc/get-error-exception-handler - . The clone language construct is now a function and supports reassigning - (readonly) properties during cloning via the new $withProperties parameter. - RFC: https://wiki.php.net/rfc/clone_with_v2 - . Added Closure::getCurrent() to receive currently executing closure. - -- Curl: - . curl_multi_get_handles() allows retrieving all CurlHandles current - attached to a CurlMultiHandle. This includes both handles added using - curl_multi_add_handle() and handles accepted by CURLMOPT_PUSHFUNCTION. - . curl_share_init_persistent() allows creating a share handle that is - persisted across multiple PHP requests. - RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement - -- DOM: - . Added Dom\Element::getElementsByClassName(). - . Added Dom\Element::insertAdjacentHTML(). - -- Enchant: - . Added enchant_dict_remove_from_session() to remove a word added to the - spellcheck session via enchant_dict_add_to_session(). - . Added enchant_dict_remove() to put a word on the exclusion list and - remove it from the session dictionary. - -- Intl: - . Added locale_is_right_to_left/Locale::isRightToLeft, returns true if - the locale is written right to left (after its enrichment with likely subtags). - . Added grapheme_levenshtein() function. - RFC: https://wiki.php.net/rfc/grapheme_levenshtein - -- Opcache: - . Added opcache_is_script_cached_in_file_cache(). - -- Pdo\Sqlite: - . Added support for Pdo\Sqlite::setAuthorizer(), which is the equivalent of - SQLite3::setAuthorizer(). The only interface difference is that the - pdo version returns void. - -- PGSQL: - . pg_close_stmt offers an alternative way to close a prepared - statement from the DEALLOCATE sql command in that we can reuse - its name afterwards. - . pg_service returns the ongoing service name of the connection. - -- Reflection: - . ReflectionConstant::getFileName() was introduced. - . ReflectionConstant::getExtension() and - ReflectionConstant::getExtensionName() were introduced. - . ReflectionConstant::getAttributes() was introduced. - RFC: https://wiki.php.net/rfc/attributes-on-constants - . ReflectionProperty::getMangledName() was introduced. - -- Sqlite: - . Sqlite3Stmt::busy to check if a statement had been fetched - but not completely. - -- Standard: - . Added array_first() and array_last(). - RFC: https://wiki.php.net/rfc/array_first_last - ======================================== 7. New Classes and Interfaces ======================================== -- Core: - . NoDiscard attribute was added. - RFC: https://wiki.php.net/rfc/marking_return_value_as_important - . DelayedTargetValidation attribute was added. - RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute - -- Curl: - . CurlSharePersistentHandle representing a share handle that is persisted - across multiple PHP requests. - RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement - -- URI: - . Uri\UriException, Uri\InvalidUriException, Uri\UriComparisonMode, - Uri\Rfc3986\Uri, Uri\WhatWg\InvalidUrlException, - Uri\WhatWg\UrlValidationErrorType, Uri\WhatWg\UrlValidationError, - and Uri\WhatWg\Url are added. - RFC: https://wiki.php.net/rfc/url_parsing_api - ======================================== 8. Removed Extensions and SAPIs ======================================== @@ -822,245 +51,22 @@ PHP 8.5 UPGRADE NOTES 9. Other Changes to Extensions ======================================== -- Curl: - . curl_easy_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. - RFC: https://wiki.php.net/rfc/url_parsing_api - -- 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. - ======================================== 10. 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. - ======================================== 11. Changes to INI File Handling ======================================== -- Core: - . Added fatal_error_backtraces to control whether fatal errors should include - a backtrace. - RFC: https://wiki.php.net/rfc/error_backtraces_v2 - . 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. - ML discussion: https://externals.io/message/127108 - -- 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. - Note: 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. - ======================================== 12. Windows Support ======================================== -* 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 (like that already - worked for in-tree builds); some extension builds (especially when using - Makefile.frag.w32) may need adjustments. - -* --enable-sanitizer is now supported for MSVC builds. This enables ASan and - debug assertions, and is supported as of MSVC 16.10 and Windows 10. - -* The --with-uncritical-warn-choke 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. - ======================================== 13. Other Changes ======================================== -- 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()`. - -- CLI/CGI: - . The `-z` or `--zend-extension` option has been removed as it was - non-functional. Use `-d zend_extension=` 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. See GH-10809, GH-10733. - ======================================== 14. Performance Improvements ======================================== - -- 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. - -- ReflectionProperty: - . Improved performance of the following methods: getValue(), getRawValue(), - isInitialized(), setValue(), 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. - -- XMLReader: - . Improved property access performance. - -- XMLWriter: - . Improved performance and reduce memory consumption. diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 66f7fea5a724e..70b7e2e7453b0 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -1,4 +1,4 @@ -PHP 8.5 INTERNALS UPGRADE NOTES +PHP 8.6 INTERNALS UPGRADE NOTES 1. Internal API changes @@ -14,166 +14,18 @@ PHP 8.5 INTERNALS UPGRADE NOTES 1. Internal API changes ======================== - . PG(arg_separator).input and PG(arg_separator).output are now `zend_string*` - instead of `char*`. - . DL_LOAD now doesn't use RTLD_DEEPBIND deepbind anymore on platforms - where dlmopen with LM_ID_NEWLM is available: - this means shared library symbol isolation (if needed) must be enabled on - the user side when requiring libphp.so, by using dlmopen with LM_ID_NEWLM - instead of dlopen. - RTLD_DEEPBIND is still enabled when the Apache SAPI is in use. - . The ptr field of the php_stream_notifier struct is now a void* instead - of a zval. If the zval was used to store IS_PTR values only, the - extra layer of indirection can be removed. In other cases a zval can - be heap-allocated and stored in the pointer as a minimal change to keep - compatibility. - . The validator callbacks for internal attribute now return `zend_string *` - rather than `void`; instead of emitting an error when an attribute is - applied incorrectly, the error message should be returned as a zend_string - pointer. If the error will be delayed until runtime, it is stored in the - new `validation_error` field of the `zend_attribute` struct. - RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute - . Added zend_safe_assign_to_variable_noref() function to safely assign - a value to a non-reference zval. - . Added zval_ptr_safe_dtor() to safely destroy a zval when a destructor - could interfere. - . zend_get_callable_name() now returns the name of the underlying function - for fake closures. - . Added smart_string_append_printf() matching smart_str_append_printf() for - char* instead of zend_string*-based smart strings. - . Added php_build_provider() to retrieve the value of PHP_BUILD_PROVIDER at - runtime. - . Removed the cache_slot argument of zend_check_user_type_slow() because - now it only relies on the CE cache. - . Added ZEND_NONSTRING attribute macro for character arrays that do not - represent strings. This allows to silence the GCC 15.x - `-Wunterminated-string-initialization` warning. - . Added the zend_update_exception_properties() function for instantiating - Exception child classes. It updates the $message, $code, and $previous - properties. - . zend_exception_get_default() was removed, use zend_ce_exception directly. - . zend_get_error_exception() was removed, use zend_ce_error_exception - directly. - . ZEND_IS_XDIGIT() macro was removed because it was unused and its name - did not match its actual behavior. - . The following zend_string-related legacy aliases were removed: - * IS_INTERNED() - use ZSTR_IS_INTERNED() - * STR_EMPTY_ALLOC() - use ZSTR_EMPTY_ALLOC() - * _STR_HEADER_SIZE - use _ZSTR_HEADER_SIZE - * STR_ALLOCA_ALLOC() - use ZSTR_ALLOCA_ALLOC() - * STR_ALLOCA_INIT() - use ZSTR_ALLOCA_INIT() - * STR_ALLOCA_FREE() - use ZSTR_ALLOCA_FREE() - . zend_register_constant() now returns a pointer to the added constant - on success and NULL on failure instead of SUCCESS/FAILURE. - The specialized registration methods that previously had void returns - also return pointers to the added constants: - * zend_register_bool_constant() - * zend_register_null_constant() - * zend_register_long_constant() - * zend_register_double_constant() - * zend_register_string_constant() - * zend_register_stringl_constant() - . EG(fake_scope) now is a _const_ zend_class_entry*. - . zend_begin_record_errors() or EG(record_errors)=true cause errors to be - delayed. Before, errors would be recorded but not delayed. - . zend_mm_refresh_key_child() must be called on any zend_mm_heap inherited - from the parent process after a fork(). - . HASH_KEY_IS_* constants have been moved in the zend_hash_key_type enum. - ======================== 2. Build system changes ======================== -- Abstract - . Preprocessor macro SIZEOF_PTRDIFF_T has been removed. - . Preprocessor macro SIZEOF_INTMAX_T has been removed. - -- Windows build system changes - . SAPI() and ADD_SOURCES() now support the optional `duplicate_sources` - parameter. If truthy, no rules to build the object files are generated. - This allows to build additional variants of SAPIs (e.g. a DLL and EXE) - without duplicate build rules. It is up to the SAPI maintainers to ensure - that appropriate build rules are created. - -- Unix build system changes - . libdir is properly set when --libdir (ex: /usr/lib64) and --with-libdir (ex: lib64) - configure options are used to ${libdir}/php (ex: /usr/lib64/php) - . PHP_ODBC_CFLAGS, PHP_ODBC_LFLAGS, PHP_ODBC_LIBS, PHP_ODBC_TYPE preprocessor - macros defined by ext/odbc are now defined in php_config.h instead of the - build-defs.h header. - . Autoconf macro AX_CHECK_COMPILE_FLAG updated to serial 11. - . Autoconf macro PHP_AP_EXTRACT_VERSION has been removed. - . Autoconf macro PHP_BUILD_THREAD_SAFE has been removed (set enable_zts - manually). - . Autoconf macro PHP_CHECK_SIZEOF is obsolete (use AC_CHECK_SIZEOF). - . Autoconf macro PHP_DEF_HAVE has been removed (use AC_DEFINE). - . Autoconf macro PHP_OUTPUT has been removed (use AC_CONFIG_FILES). - . Autoconf macro PHP_TEST_BUILD has been removed (use AC_* macros). - . Preprocessor macro HAVE_PTRDIFF_T has been removed. - . Preprocessor macro HAVE_INTMAX_T has been removed. - . Preprocessor macro HAVE_SSIZE_T has been removed. - . Preprocessor macro SIZEOF_SSIZE_T has been removed. - ======================== 3. Module changes ======================== -- Gd: - . The gdImageScale*() and gdImageRotate*() helpers are now internal in the - bundled libgd, like they have been in external libgd as of gd-2.1.1. - -- Hash: - . Hash functions now use proper hash_spec_result enum for return values - instead of using SUCCESS and FAILURE. - -- JSON: - . php_json_encode_serializable_object() now assumes `EG(active)`, - if not a bailout is caused. Therefore a minor BC break exists if the - `PHP_JSON_PARTIAL_OUTPUT_ON_ERROR` option is in use. - However, this situation is highly unlikely. - -- Libxml: - . The refcount APIs now return an `unsigned int` instead of an `int`. - . Removed php_libxml_xmlCheckUTF8(). Use xmlCheckUTF8() from libxml instead. - -- PDO: - . Added `php_pdo_stmt_valid_db_obj_handle()` to check if the database object - is still valid. This is useful when a GC cycle is collected and the - database object can be destroyed prior to destroying the statement. - -- Random: - . The handlers parameter of php_random_engine_common_init() has been - removed. Use the default_object_handlers field on the CE instead. - -- Standard: - . Added php_url_decode_ex() and php_raw_url_decode_ex() that unlike their - non-ex counterparts do not work in-place. - . The php_std_date() function has been removed. Use php_format_date() with - the "D, d M Y H:i:s \\G\\M\\T" format instead. - . Added php_url_encode_to_smart_str() to encode a URL to a smart_str buffer. - . The functionality of getimagesize(), image_type_to_mime_type(), - and image_type_to_extension() is now extensible using the internal APIs - php_image_register_handler() and php_image_unregister_handler() in - php_image.h. - . ext/standard/php_smart_string.h and ext/standard/php_smart_string_public.h - were removed. Use the corresponding headers in Zend/ instead. - -- URI: - . Internal API for URI handling was added via the php_uri_*() functions. - ======================== 4. OpCode changes ======================== -* New ZEND_DECLARE_ATTRIBUTED_CONST is used when a global constant is declared - with `const` and has attributes; this opcode is used *instead* of the - ZEND_DECLARE_CONST, and in addition to the name of the constant and the - value to use, has a ZEND_OP_DATA with a pointer to the compiled attributes. - ======================== 5. SAPI changes ======================== - -- SAPIs must now call php_child_init() after a fork. If php-src code was - executed in other threads than the one initiating the fork, - refresh_memory_manager() must be called in every such thread. diff --git a/Zend/tests/asymmetric_visibility/virtual_get_only.phpt b/Zend/tests/asymmetric_visibility/virtual_get_only.phpt index 3eaada70329d4..a3f6f980bdfe3 100644 --- a/Zend/tests/asymmetric_visibility/virtual_get_only.phpt +++ b/Zend/tests/asymmetric_visibility/virtual_get_only.phpt @@ -11,4 +11,4 @@ class Foo { ?> --EXPECTF-- -Fatal error: Read-only virtual property Foo::$bar must not specify asymmetric visibility in %s on line %d +Fatal error: get-only virtual property Foo::$bar must not specify asymmetric visibility in %s on line %d diff --git a/Zend/tests/asymmetric_visibility/virtual_set_only.phpt b/Zend/tests/asymmetric_visibility/virtual_set_only.phpt index 18abb7ac046a4..7d1d2bc7cb99f 100644 --- a/Zend/tests/asymmetric_visibility/virtual_set_only.phpt +++ b/Zend/tests/asymmetric_visibility/virtual_set_only.phpt @@ -11,4 +11,4 @@ class Foo { ?> --EXPECTF-- -Fatal error: Write-only virtual property Foo::$bar must not specify asymmetric visibility in %s on line %d +Fatal error: set-only virtual property Foo::$bar must not specify asymmetric visibility in %s on line %d diff --git a/Zend/tests/property_hooks/bug001.phpt b/Zend/tests/property_hooks/bug001.phpt index 5328506d476cb..62291019b3338 100644 --- a/Zend/tests/property_hooks/bug001.phpt +++ b/Zend/tests/property_hooks/bug001.phpt @@ -27,4 +27,4 @@ try { ?> --EXPECT-- bool(true) -Property C::$x is read-only +Cannot write to get-only virtual property C::$x diff --git a/Zend/tests/property_hooks/bug008.phpt b/Zend/tests/property_hooks/bug008.phpt index 9c321cfe16e14..38fe709a38a3f 100644 --- a/Zend/tests/property_hooks/bug008.phpt +++ b/Zend/tests/property_hooks/bug008.phpt @@ -18,7 +18,7 @@ $foo->bar = 'bar'; ?> --EXPECTF-- -Fatal error: Uncaught Error: Property Foo::$bar is read-only in %s:%d +Fatal error: Uncaught Error: Cannot write to get-only virtual property Foo::$bar in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/property_hooks/get.phpt b/Zend/tests/property_hooks/get.phpt index 0cb0a6b7c76be..6d4b005843eaf 100644 --- a/Zend/tests/property_hooks/get.phpt +++ b/Zend/tests/property_hooks/get.phpt @@ -21,4 +21,4 @@ try { ?> --EXPECT-- int(42) -Property Test::$prop is read-only +Cannot write to get-only virtual property Test::$prop diff --git a/Zend/tests/property_hooks/override_add_get.phpt b/Zend/tests/property_hooks/override_add_get.phpt index 28dbd047c0718..df2739e6086c3 100644 --- a/Zend/tests/property_hooks/override_add_get.phpt +++ b/Zend/tests/property_hooks/override_add_get.phpt @@ -31,7 +31,7 @@ var_dump($b->prop); ?> --EXPECT-- A::A::$prop::set -Property A::$prop is write-only +Cannot read from set-only virtual property A::$prop B::B::$prop::set B::B::$prop::get int(42) diff --git a/Zend/tests/property_hooks/override_add_set.phpt b/Zend/tests/property_hooks/override_add_set.phpt index 6b490d4d87f94..e13de15f0b822 100644 --- a/Zend/tests/property_hooks/override_add_set.phpt +++ b/Zend/tests/property_hooks/override_add_set.phpt @@ -30,7 +30,7 @@ var_dump($b->prop); ?> --EXPECT-- -Property A::$prop is read-only +Cannot write to get-only virtual property A::$prop A::A::$prop::get int(42) B::B::$prop::set diff --git a/Zend/tests/property_hooks/set.phpt b/Zend/tests/property_hooks/set.phpt index 04e36ae85411f..2928aee6cedee 100644 --- a/Zend/tests/property_hooks/set.phpt +++ b/Zend/tests/property_hooks/set.phpt @@ -28,5 +28,5 @@ try { ?> --EXPECT-- int(42) -Property Test::$prop is write-only -Property Test::$prop is write-only +Cannot read from set-only virtual property Test::$prop +Cannot read from set-only virtual property Test::$prop diff --git a/Zend/tests/property_hooks/type_compatibility.phpt b/Zend/tests/property_hooks/type_compatibility.phpt index 8bfb7b0cadd59..def1fc77dc9ce 100644 --- a/Zend/tests/property_hooks/type_compatibility.phpt +++ b/Zend/tests/property_hooks/type_compatibility.phpt @@ -1,5 +1,5 @@ --TEST-- -Relaxed type compatibility for read-only and write-only properties +Relaxed type compatibility for get-only and set-only properties --FILE-- flags & ZEND_ACC_PPP_SET_MASK) && (!prop_info->hooks[ZEND_PROPERTY_HOOK_GET] || !prop_info->hooks[ZEND_PROPERTY_HOOK_SET])) { const char *prefix = !prop_info->hooks[ZEND_PROPERTY_HOOK_GET] - ? "Write-only" : "Read-only"; + ? "set-only" : "get-only"; zend_error_noreturn(E_COMPILE_ERROR, "%s virtual property %s::$%s must not specify asymmetric visibility", prefix, ZSTR_VAL(ce->name), ZSTR_VAL(prop_name)); diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h index efc04a63bb363..a8076c0fb9058 100644 --- a/Zend/zend_modules.h +++ b/Zend/zend_modules.h @@ -31,7 +31,7 @@ #define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module #define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module -#define ZEND_MODULE_API_NO 20240925 +#define ZEND_MODULE_API_NO 20250926 #ifdef ZTS #define USING_ZTS 1 #else diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index cca69e5d792c9..22a1d2165774f 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -809,7 +809,7 @@ ZEND_API zval *zend_std_read_property(zend_object *zobj, zend_string *name, int zend_function *get = prop_info->hooks[ZEND_PROPERTY_HOOK_GET]; if (!get) { if (prop_info->flags & ZEND_ACC_VIRTUAL) { - zend_throw_error(NULL, "Property %s::$%s is write-only", + zend_throw_error(NULL, "Cannot read from set-only virtual property %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); return &EG(uninitialized_zval); } @@ -1150,7 +1150,7 @@ found:; if (!set) { if (prop_info->flags & ZEND_ACC_VIRTUAL) { - zend_throw_error(NULL, "Property %s::$%s is read-only", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); + zend_throw_error(NULL, "Cannot write to get-only virtual property %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); variable_ptr = &EG(error_zval); goto exit; } @@ -2343,7 +2343,7 @@ ZEND_API int zend_std_has_property(zend_object *zobj, zend_string *name, int has if (!get) { if (prop_info->flags & ZEND_ACC_VIRTUAL) { - zend_throw_error(NULL, "Property %s::$%s is write-only", + zend_throw_error(NULL, "Cannot read from set-only virtual property %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); return 0; } else { diff --git a/configure.ac b/configure.ac index 5059f55127b06..54f6157d96aa4 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.5.0-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.6.0-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/ext/lexbor/lexbor/url/url.c b/ext/lexbor/lexbor/url/url.c index 9185d77d35438..7bc9a0b8945f4 100644 --- a/ext/lexbor/lexbor/url/url.c +++ b/ext/lexbor/lexbor/url/url.c @@ -4246,7 +4246,8 @@ lxb_url_host_set_h(lxb_url_t *url, lxb_url_parser_t *parser, lxb_url_parser_t self_parser; const lxb_char_t tmp[1] = ""; - if (url->host.type == LXB_URL_HOST_TYPE_OPAQUE) { + /* If this’s URL has an opaque path, then return. */ + if (url->path.opaque) { return LXB_STATUS_OK; } diff --git a/main/php.h b/main/php.h index 5c0b89c328375..8bb47ed275825 100644 --- a/main/php.h +++ b/main/php.h @@ -22,7 +22,7 @@ #include #endif -#define PHP_API_VERSION 20240925 +#define PHP_API_VERSION 20250926 #define PHP_HAVE_STREAMS #define YYDEBUG 0 #define PHP_DEFAULT_CHARSET "UTF-8" diff --git a/main/php_version.h b/main/php_version.h index 269397ba11e18..fa9484cbe1502 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -1,8 +1,8 @@ /* automatically generated by configure */ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 -#define PHP_MINOR_VERSION 5 +#define PHP_MINOR_VERSION 6 #define PHP_RELEASE_VERSION 0 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.5.0-dev" -#define PHP_VERSION_ID 80500 +#define PHP_VERSION "8.6.0-dev" +#define PHP_VERSION_ID 80600 diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 0930a86b741ca..b6693df2a5c3d 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -95,10 +95,10 @@ if (typeof(CWD) == "undefined") { if (!MODE_PHPIZE) { /* defaults; we pick up the precise versions from configure.ac */ var PHP_VERSION = 8; - var PHP_MINOR_VERSION = 5; + var PHP_MINOR_VERSION = 6; var PHP_RELEASE_VERSION = 0; var PHP_EXTRA_VERSION = ""; - var PHP_VERSION_STRING = "8.5.0"; + var PHP_VERSION_STRING = "8.6.0"; } /* Get version numbers and DEFINE as a string */