From 8d335e96d07b73ec3925ac4b82aa736eb5d05405 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Fri, 22 Sep 2023 01:43:08 +0900 Subject: [PATCH 01/25] Added PHP 8.3 migration guide. --- appendices/migration83.xml | 56 ++++ appendices/migration83/constants.xml | 332 +++++++++++++++++++++ appendices/migration83/deprecated.xml | 151 ++++++++++ appendices/migration83/incompatible.xml | 177 +++++++++++ appendices/migration83/new-classes.xml | 40 +++ appendices/migration83/new-features.xml | 154 ++++++++++ appendices/migration83/new-functions.xml | 170 +++++++++++ appendices/migration83/windows-support.xml | 34 +++ 8 files changed, 1114 insertions(+) create mode 100644 appendices/migration83.xml create mode 100644 appendices/migration83/constants.xml create mode 100644 appendices/migration83/deprecated.xml create mode 100644 appendices/migration83/incompatible.xml create mode 100644 appendices/migration83/new-classes.xml create mode 100644 appendices/migration83/new-features.xml create mode 100644 appendices/migration83/new-functions.xml create mode 100644 appendices/migration83/windows-support.xml diff --git a/appendices/migration83.xml b/appendices/migration83.xml new file mode 100644 index 000000000000..27a6f6b34a88 --- /dev/null +++ b/appendices/migration83.xml @@ -0,0 +1,56 @@ + + + Migrating from PHP 8.2.x to PHP 8.3.x + + &appendices.migration83.new-features; + &appendices.migration83.new-classes; + &appendices.migration83.new-functions; + &appendices.migration83.constants; + &appendices.migration83.incompatible; + &appendices.migration83.deprecated; + + &appendices.migration83.windows-support; + + + + This new minor version brings with it a number of + new features and a + few incompatibilities + that should be tested for before switching PHP versions in production + environments. + + + + &manual.migration.seealso; + 7.1.x, + 7.2.x, + 7.3.x, + 7.4.x, + 8.0.x, + 8.1.x. + 8.2.x. + + + + diff --git a/appendices/migration83/constants.xml b/appendices/migration83/constants.xml new file mode 100644 index 000000000000..11bed37ee9e2 --- /dev/null +++ b/appendices/migration83/constants.xml @@ -0,0 +1,332 @@ + + + New Global Constants + + + cURL + + + + + CURLINFO_CAPATH (libcurl >= 7.84.0) + + + + + CURLINFO_CAINFO (libcurl >= 7.84.0) + + + + + CURLOPT_MIME_OPTIONS (libcurl >= 7.81.0) + + + + + CURLMIMEOPT_FORMESCAPE (libcurl >= 7.81.0) + + + + + CURLOPT_WS_OPTIONS (libcurl >= 7.86.0) + + + + + CURLWS_RAW_MODE (libcurl >= 7.86.0) + + + + + CURLOPT_SSH_HOSTKEYFUNCTION (libcurl >= 7.84.0) + + + + + CURLOPT_PROTOCOLS_STR (libcurl >= 7.85.0) + + + + + CURLOPT_REDIR_PROTOCOLS_STR (libcurl >= 7.85.0) + + + + + CURLOPT_CA_CACHE_TIMEOUT (libcurl >= 7.87.0) + + + + + CURLOPT_QUICK_EXIT (libcurl >= 7.87.0) + + + + + CURLKHMATCH_OK (libcurl >= 7.84.0) + + + + + CURLKHMATCH_MISMATCH (libcurl >= 7.84.0) + + + + + CURLKHMATCH_MISSING (libcurl >= 7.84.0) + + + + + CURLKHMATCH_LAST (libcurl >= 7.84.0) + + + + + + + Intl + + + + MIXED_NUMBERS (Spoofchecker) + + + HIDDEN_OVERLAY (Spoofchecker) + + + + + + OpenSSL + + + + OPENSSL_CMS_OLDMIMETYPE + + + PKCS7_NOOLDMIMETYPE + + + + + + PCNTL + + + + SIGINFO + + + + + + PDO_ODBC + + + + PDO_ODBC_TYPE + + + + + + Posix + + + + POSIX_SC_ARG_MAX + + + POSIX_SC_PAGESIZE + + + POSIX_SC_NPROCESSORS_CONF + + + POSIX_SC_NPROCESSORS_ONLN + + + POSIX_PC_LINK_MAX + + + POSIX_PC_MAX_CANON + + + POSIX_PC_MAX_INPUT + + + POSIX_PC_NAME_MAX + + + POSIX_PC_PATH_MAX + + + POSIX_PC_PIPE_BUF + + + POSIX_PC_CHOWN_RESTRICTED + + + POSIX_PC_NO_TRUNC + + + POSIX_PC_ALLOC_SIZE_MIN + + + POSIX_PC_SYMLINK_MAX + + + + + + Sockets + + + The following socket options are now defined if they are supported: + + + + + SO_ATTACH_REUSEPORT_CBPF (Linux) + + + SO_DETACH_BPF (Linux) + + + SO_DETACH_FILTER (Linux) + + + TCP_QUICKACK (Linux) + + + IP_DONTFRAG (FreeBSD) + + + IP_MTU_DISCOVER (Linux) + + + IP_PMTUDISC_DO (Linux) + + + IP_PMTUDISC_DONT (Linux) + + + IP_PMTUDISC_WANT (Linux) + + + IP_PMTUDISC_PROBE (Linux) + + + IP_PMTUDISC_INTERFACE (Linux) + + + IP_PMTUDISC_OMIT (Linux) + + + AF_DIVERT (FreeBSD) + + + SOL_UDPLITE + + + UDPLITE_RECV_CSCOV + + + UDPLITE_SEND_CSCOV + + + + SO_RERROR (NetBSD) + + + SO_ZEROIZE (OpenBSD) + + + SO_SPLICE (OpenBSD) + + + TCP_REPAIR (Linux) + + + SO_REUSEPORT_LB (FreeBSD) + + + IP_BIND_ADDRESS_NO_PORT (Linux) + + + + + + Zip + + + + + ZipArchive::ER_DATA_LENGTH (libzip >= 1.10) + + + + + ZipArchive::ER_NOT_ALLOWED (libzip >= 1.10) + + + + + ZipArchive::AFL_RDONLY (libzip >= 1.10) + + + + + ZipArchive::AFL_IS_TORRENTZIP (libzip >= 1.10) + + + + + ZipArchive::AFL_WANT_TORRENTZIP (libzip >= 1.10) + + + + + ZipArchive::AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE (libzip >= 1.10) + + + + + ZipArchive::FL_OPEN_FILE_NOW + + + + + ZipArchive::LENGTH_TO_END as default value for ZipArchive::addFile and ZipArchive::replaceFile + + + + + ZipArchive::LENGTH_UNCHECKED (libzip >= 1.10) + + + + + + + diff --git a/appendices/migration83/deprecated.xml b/appendices/migration83/deprecated.xml new file mode 100644 index 000000000000..60d39a5fb495 --- /dev/null +++ b/appendices/migration83/deprecated.xml @@ -0,0 +1,151 @@ + + + Deprecated Features + + + PHP Core + + + Saner Increment/Decrement operators + + + Using the ++ operator on empty, non-numeric, or non-alphanumeric strings + is now deprecated. Moreover, incrementing non-numeric strings is soft + deprecated and the new str_increment function should be used instead. + + + + Using the -- operator on empty or non-numeric strings is now deprecated. + + + + + + get_class()/get_parent_class() call without arguments + + + Calling get_class and get_parent_class without arguments is now + deprecated. + + + + + DBA + + + Calling dba_fetch with $dba as the 3rd argument is now deprecated. + + + + + + + FFI + + + Calling FFI::cast, FFI::new, and FFI::type statically is now + deprecated. + + + + + Intl + + + The U_MULTIPLE_DECIMAL_SEP*E*RATORS constant had been deprecated, using + the U_MULTIPLE_DECIMAL_SEP*A*RATORS instead is recommended. + + + The NumberFormatter::TYPE_CURRENCY has been deprecated. + + + + + LDAP + + + Calling ldap_connect with separate hostname and port is deprecated. + + + + + + MBString + + + Passing a negative $width to mb_strimwidth is now deprecated. + + + + + Phar + + + Calling Phar::setStub with a resource and a length is now deprecated. + Such calls should be replaced by: + $phar->setStub(stream_get_contents($resource)); + + + + + Random + + + The MT_RAND_PHP Mt19937 variant is deprecated. + + + + + + Standard + + + The assert_options function is now deprecated. + + + The ASSERT_ACTIVE, ASSERT_BAIL, ASSERT_CALLBACK, ASSERT_EXCEPTION, and + ASSERT_WARNING constants have been deprecated. + + + + + + SQLite3 + + + Using exceptions is now preferred, warnings will be removed in the future. + Calling SQLite3::enableExceptions(false) will trigger a depreciation + warning in this version. + + + + + Zip + + + The ZipArchive::FL_RECOMPRESS constant is deprecated and will be removed + in a future version of libzip. + + + + + diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml new file mode 100644 index 000000000000..c7ec3534e9c9 --- /dev/null +++ b/appendices/migration83/incompatible.xml @@ -0,0 +1,177 @@ + + + Backward Incompatible Changes + + + Core + + + Programs that were very close to overflowing the call stack may now throw an + Error when using more than + zend.max_allowed_stack_size-zend.reserved_stack_size bytes of stack + (fiber.stack_size-zend.reserved_stack_size for fibers). + + + + Executing proc_get_status multiple times will now always return the right + value on posix systems. Previously, only the first call of the function + returned the right value. Executing proc_close after proc_get_status + will now also return the right exit code. Previously this would return -1. + Internally, this works by caching the result on posix systems. If you want + the old behaviour, you can check the "cached" key in the array returned by + proc_get_status to check whether the result was cached. + + + + Zend Max Execution Timers is now enabled by default for ZTS builds on + Linux. + + + + Uses of traits with static properties will now redeclare static properties + inherited from the parent class. This will create a separate static + property storage for the current class. This is analogous to adding the + static property to the class directly without traits. + + + + Assigning a negative index n to an empty array will now make sure that the + next index is n+1 instead of 0. + + + + Class constant visibility variance is now correctly checked when inherited + from interfaces. + + + + WeakMap entries whose key maps to itself (possibly transitively) may now + be removed during cycle collection if the key is not reachable except by + iterating over the WeakMap (reachability via iteration is considered weak). + Previously, such entries would never be automatically removed. + + + + + + DOM + + + DOMChildNode::after, DOMChildNode::before, DOMChildNode::replaceWith + on a node that has no parent is now a no-op instead of a hierarchy + exception, which is the behaviour spec demands. + + + + Using the DOMParentNode and DOMChildNode methods without a document now + works instead of throwing a HIERARCHY_REQUEST_ERR DOMException. This is in + line with the behaviour spec demands. + + + + DOMDocument::createAttributeNS without specifying a prefix would incorrectly create + a default namespace, placing the element inside the namespace instead of + the attribute. This bug is now fixed. + + + + DOMDocument::createAttributeNS would previously incorrectly throw a NAMESPACE_ERR + when the prefix was already used for a different uri. It now correctly + chooses a different prefix when there's a prefix name conflict. + + + + New methods and properties were added to some DOM classes. If you inherit + from these and you happen to have a method or property with the same name, + you might encounter errors if the declaration is incompatible. + New Features and New Functions for a list of + newly implemented methods and properties. + + + + + + FFI + + + C functions that have a return type of void now return null instead of + returning the following object object(FFI\CData:void) { } + + + + + Opcache + + + The opcache.consistency_checks INI directive was removed. This feature was + broken with the tracing JIT, as well as with inheritance cache, and has + been disabled without a way to enable it since PHP 8.1.18 and PHP 8.2.5. + Both the tracing JIT and inheritance cache may modify shm after the script + has been persisted by invalidating its checksum. The attempted fix skipped + over the modifiable pointers but was rejected due to complexity. For this + reason, it was decided to remove the feature instead. + + + + + Phar + + + The type of Phar class constants are now declared. + + + + + Standard + + + The range function has had various changes: + + A TypeError is now thrown when passing objects, resources, or arrays + as the boundary inputs. + A more descriptive ValueError is thrown when passing 0 for $step. + A ValueError is now thrown when using a negative $step for increasing ranges. + If $step is a float that can be interpreted as an int, it is now done so. + A ValueError is now thrown if any argument is infinity or NAN. + An E_WARNING is now emitted if $start or $end is the empty string. The value continues to be cast to the value 0. + An E_WARNING is now emitted if $start or $end has more than one byte, only if it is a non-numeric string. + An E_WARNING is now emitted if $start or $end is cast to an integer because the other boundary input is a number. (e.g. range(5, 'z');). + An E_WARNING is now emitted if $step is a float when trying to generate a range of characters, except if both boundary inputs are numeric strings (e.g. range('5', '9', 0.5); does not produce a warning). + range now produce a list of characters if one of the boundary inputs is a string digit instead of casting the other input to int (e.g. range('5', 'z');). + + + + + The file flags error check now catches all invalid flags. Notably FILE_APPEND was previously silently accepted. + + + + + SNMP + + + The type of SNMP class constants are now declared. + + + + + diff --git a/appendices/migration83/new-classes.xml b/appendices/migration83/new-classes.xml new file mode 100644 index 000000000000..b282a062b96b --- /dev/null +++ b/appendices/migration83/new-classes.xml @@ -0,0 +1,40 @@ + + + + + New Classes and Interfaces + + + Random + + + + + IntervalBoundary + + + + + + + + diff --git a/appendices/migration83/new-features.xml b/appendices/migration83/new-features.xml new file mode 100644 index 000000000000..a2418c3a2e83 --- /dev/null +++ b/appendices/migration83/new-features.xml @@ -0,0 +1,154 @@ + + + New Features + + + PHP Core + + + Readonly Amendments + + + Anonymous classes may now be marked as readonly. + + + + Readonly properties can now be reinitialized during cloning. + + + + + + Typed Class Constants + + + Class, interface, trait, and enum constants now support type declarations. + + + + + + Closures created from magic methods + + + Closures created from magic methods can now accept named arguments. + + + + + The final modifier with a method from a trait + + + The final modifier may now be used when using a method from a trait. + + + + + Override Attribute + + + Added the #[\Override] attribute to check that a method exists in a parent class or implemented interface. + + + + + + Fetch class constant dynamically syntax + + + Class constants can now be accessed dynamically using the C::{$name} + syntax. + + + + + + Static variable Initializer + + + Static variable initializers can now contain arbitrary expressions. + + + + + + + + CLI + + + It is now possible to lint multiple files. + + + + + DOM + + + Added properties DOMElement::className and DOMElement::id. + These are not binary-safe at the moment because of underlying limitations of libxml2. + This means that the property values will be cut off at a NUL byte. + + + + + FFI + + + It is now possible to assign FFI/CData to other FFI/CData. This means you can now assign CData to structs and fields. + + + + + Opcache + + + opcache_get_status()['scripts'][n]['revalidate'] now contains a Unix timestamp of when the next revalidation of the scripts timestamp is due,dictated by the opcache.revalidate_freq INI directive. + + + + + POSIX + + + posix_getrlimit now takes an optional $res parameter to allow fetching a single resource limit. + + + + posix_isatty now raises type warnings for integers following the usual ZPP semantics. + + + + posix_ttyname now raises type warnings for integers following the usual ZPP semantics and value warnings for invalid file descriptor integers. + + + + + Streams + + + Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was previously not implemented. + + + + + diff --git a/appendices/migration83/new-functions.xml b/appendices/migration83/new-functions.xml new file mode 100644 index 000000000000..8d14fab5e31b --- /dev/null +++ b/appendices/migration83/new-functions.xml @@ -0,0 +1,170 @@ + + + New Functions + + + Date + + + DatePeriod::createFromISO8601String + + + + + DOM + + + DOMElement::getAttributeNames + + DOMElement::insertAdjacentElement + + DOMElement::insertAdjacentText + + DOMElement::toggleAttribute + + DOMNode::contains + + DOMNode::getRootNode + + DOMNode::isConnected + + DOMNode::isEqualNode + + DOMNode::parentElement + + DOMNameSpaceNode::contains + + DOMNameSpaceNode::isConnected + + DOMNameSpaceNode::parentElement + + DOMParentNode::replaceChildren + + + + + Intl + + + IntlCalendar::setDate + + IntlCalendar::setDateTime + + IntlGregorianCalendar::createFromDate + + IntlGregorianCalendar::createFromDateTime + + + + + JSON + + json_validate + + + + + + LDAP + + ldap_connect_wallet + ldap_exop_sync + + + + + MBString + + mb_str_pad + + + + + + Posix + + posix_sysconf + posix_pathconf + posix_fpathconf + posix_eaccess + + + + + PostgreSQL + + pg_set_error_context_visibility (libpq >= 9.6) + pg_enter_pipeline_mode + pg_exit_pipeline_mode + pg_pipeline_sync + pg_pipeline_status + + + + + Random + + + + Randomizer::getBytesFromString + + Randomizer::nextFloat + + Randomizer::getFloat + + + + + Reflection + + + ReflectionMethod::createFromMethodName + + + + + Sockets + + socket_atmark + + + + + Standard + + str_increment + str_decrement + + stream_context_set_options + + + + + Zip + + + ZipArchive::getArchiveFlag + + + + + diff --git a/appendices/migration83/windows-support.xml b/appendices/migration83/windows-support.xml new file mode 100644 index 000000000000..ebb9105f7966 --- /dev/null +++ b/appendices/migration83/windows-support.xml @@ -0,0 +1,34 @@ + + + Windows Support + + + Core + + + Minimum supported Windows version has been bumped to Windows 8 or + Windows Server 2012 + + + + + From 11cc3404e863f2e12018452aa47f8ea8ac9e0f99 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Fri, 22 Sep 2023 02:14:21 +0900 Subject: [PATCH 02/25] Update appendices/migration83/new-features.xml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- appendices/migration83/new-features.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration83/new-features.xml b/appendices/migration83/new-features.xml index a2418c3a2e83..ec4e222175e2 100644 --- a/appendices/migration83/new-features.xml +++ b/appendices/migration83/new-features.xml @@ -85,7 +85,7 @@ DOM - Added properties DOMElement::className and DOMElement::id. + Added properties DOMElement::$className and DOMElement::$id. These are not binary-safe at the moment because of underlying limitations of libxml2. This means that the property values will be cut off at a NUL byte. From dcfdb953600bb13851701cd7494862e4d9e2eaf3 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Fri, 22 Sep 2023 21:39:51 +0900 Subject: [PATCH 03/25] added "Other Changes" page. --- appendices/migration83.xml | 2 - appendices/migration83/deprecated.xml | 9 + appendices/migration83/other-changes.xml | 458 +++++++++++++++++++++++ 3 files changed, 467 insertions(+), 2 deletions(-) create mode 100644 appendices/migration83/other-changes.xml diff --git a/appendices/migration83.xml b/appendices/migration83.xml index 27a6f6b34a88..0e6925c2474e 100644 --- a/appendices/migration83.xml +++ b/appendices/migration83.xml @@ -8,9 +8,7 @@ &appendices.migration83.constants; &appendices.migration83.incompatible; &appendices.migration83.deprecated; - &appendices.migration83.windows-support; diff --git a/appendices/migration83/deprecated.xml b/appendices/migration83/deprecated.xml index 60d39a5fb495..f524101ee6df 100644 --- a/appendices/migration83/deprecated.xml +++ b/appendices/migration83/deprecated.xml @@ -96,6 +96,15 @@ + + Reflection + + + Calling ReflectionProperty::setValue with only one parameter is deprecated. + To set static properties, pass null as the first parameter. + + + Standard diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml new file mode 100644 index 000000000000..0459f3f8aca4 --- /dev/null +++ b/appendices/migration83/other-changes.xml @@ -0,0 +1,458 @@ + + + Other Changes + + + Changes in SAPI Modules + + + CLI + + + The STDOUT, STDERR and STDIN streams are no longer closed on resource destruction + which is mostly when the CLI finishes. It is however still possible to + explicitly close those streams using fclose and similar. + + + + + + Changed Functions + + + Core + + + gc_status has added the following 8 fields: + + + "running" => bool + "protected" => bool + "full" => bool + "buffer_size" => int + "application_time" => float: Total application time, in seconds (including collector_time) + "collector_time" => float: Time spent collecting cycles, in seconds (including destructor_time and free_time) + "destructor_time" => float: Time spent executing destructors during cycle collection, in seconds + "free_time" => float: Time spent freeing values during cycle collection, in seconds + + + + + class_alias now supports creating an alias of an internal class. + + + + Setting open_basedir at runtime using ini_set('open_basedir', ...); no + longer accepts paths containing the parent directory (`..`). Previously, + only paths starting with `..` were disallowed. This could easily be + circumvented by prepending `./` to the path. + + + + User exception handlers now catch exceptions during shutdown. + + + + The resultant HTML of highlight_string and highlight_file has changed. + Whitespace between outer HTML tags is removed. Newlines and spaces + are no longer converted to HTML entities. The whole HTML is now wrapped in + <pre> tag. The outer <span> has been merged with <code>. + + + + + + Calendar + + + easter_date now supports years from 1970 to 2,000,000,000 on 64-bit + systems, previously it only supported years in the range from 1970 to 2037. + + + + + Curl + + + curl_getinfo now supports two new constants: CURLINFO_CAPATH and + CURLINFO_CAINFO. If option is &null;, the following two additional keys are + present: "capath" and "cainfo". + + + + + DOM + + + Changed DOMCharacterData::appendData tentative return type to true. + + + + DOMDocument::loadHTML, DOMDocument::loadHTMLFile, + DOMDocument::loadXML and DOMDocument::loadXMLFile now have a tentative + return type of bool. Previously, this was documented as having a return + type of DOMDocument|bool, but DOMDocument cannot be returned since PHP 8.0 + as it is no longer statically callable. + + + + + + Gd + + + Changed imagerotate signature, removed the `ignore_transparent` argument + as it was not used internally anyway from PHP 7.x. + + + + + Intl + + + datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone) + now returns &true; on success, previously &null; was returned. + + + + IntlBreakiterator::setText now returns &false; on failure, previously + &null; was returned. + now returns &true; on success, previously &null; was returned. + + + + IntlChar::enumCharNames is now returning a boolean. + Previously it returned &null; on success and &false; on failure. + + + + + MBString + + + mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional + casing rules for the Greek letter sigma. For mb_convert_case, conditional + casing only applies to MB_CASE_LOWER and MB_CASE_TITLE modes, not to + MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE. + + + + mb_decode_mimeheader interprets underscores in QPrint-encoded MIME + encoded words as required by RFC 2047; they are converted to spaces. + Underscores must be encoded as "=5F" in such MIME encoded words. + + + + In rare cases, mb_encode_mimeheader will transfer-encode its input + string where it would pass it through as raw ASCII in PHP 8.2. + + + + mb_encode_mimeheader no longer drops NUL (zero) bytes when + QPrint-encoding the input string. This previously caused strings in + certain text encodings, especially UTF-16 and UTF-32, to be + corrupted by mb_encode_mimeheader. + + + + mb_detect_encoding's "non-strict" mode now behaves as described in the + documentation. Previously, it would return false if the same byte + (for example, the first byte) of the input string was invalid in all + candidate encodings. More generally, it would eliminate candidate + encodings from consideration when an invalid byte was seen, and if the + same input byte eliminated all remaining encodings still under + consideration, it would return false. On the other hand, if all candidate + encodings but one were eliminated from consideration, it would return the + last remaining one without regard for how many encoding errors might be + encountered later in the string. This is different from the behavior + described in the documentation, which says: "If strict is set to false, + the closest matching encoding will be returned." + + + + + mysqli + + + mysqli_fetch_object now raises a ValueError instead of an Exception when + the constructor_args argument is non empty with the class not having + constructor. + + + + mysqli_poll now raises a ValueError when the read nor error arguments are + passed. + + + + mysqli_field_seek and mysqli_result::field_seek now specify return type + as true instead of bool. + + + + + ODBC + + + odbc_autocommit now accepts null for the $enable parameter. + Passing &null; has the same behaviour as passing only 1 parameter, + namely indicating if the autocommit feature is enabled or not. + + + + + PGSQL + + + pg_fetch_object now raises a ValueError instead of an Exception when the + constructor_args argument is non empty with the class not having + constructor. + + + + pg_insert now raises a ValueError instead of a WARNING when the table + specified is invalid. + + + + pg_insert and pg_convert raises a ValueError or a TypeError instead of a + WARNING when the value/type of a field does not match properly with a + PostgreSQL's type. + + + + The $row param of pg_fetch_result, pg_field_prtlen and + pg_field_is_null is now nullable. + + + + + Random + + + Changed mt_srand and srand to not check the number of arguments to + determine whether a random seed should be used. Passing null will generate + a random seed, 0 will use zero as the seed. The functions are now + consistent with Mt19937::__construct. + + + + + + Reflection + + + Return type of ReflectionClass::getStaticProperties is no longer nullable. + + + + + Standard + + + E_NOTICEs emitted by unserialize have been promoted to E_WARNING. + + + + + unserialize now emits a new E_WARNING if the input contains unconsumed + bytes. + + + + + array_pad is now only limited by the maximum number of elements an array + can have. Before, it was only possible to add at most 1048576 elements at a + time. + + + + strtok raises a warning in the case token is not provided when starting + tokenization. + + + + password_hash will now chain the underlying Random\RandomException + as the ValueError’s $previous Exception when salt generation fails. + + + + proc_open $command array must now have at least one non empty element. + + + + array_sum and array_product now warn when values in the array cannot + be converted to int/float. Previously arrays and objects where ignored + whilst every other value was cast to int. Moreover, objects that define + a numeric cast (e.g. GMP) are now casted instead of ignored. + + + + + number_format $decimal parameter handles rounding to negative places. It + means that when $decimals is negative, $num is rounded to $decimals + significant digits before the decimal point. Previously negative $decimals + got silently ignored and the number got rounded to zero decimal places. + + + + The $before_needle argument added to strrchr which works in the same way + like its counterpart in strstr or stristr. + + + + str_getcsv and fgetcsv return empty string instead of a string with + a single zero byte for the last field which contains only unterminated + enclosure. + + + + + + + Other Changes to Extensions + + + Core + + + Internal objects that implement an _IS_NUMBER cast but not a do_operator + handler that overrides addition and subtraction now can be incremented + and decrement as if one would do $o += 1 or $o -= 1 + + + + + DOM + + + The DOM lifetime mechanism has been reworked such that implicitly removed + nodes can still be fetched. Previously this resulted in an exception. + + + + + SQLite3 + + + The SQLite3 class now throws \SQLite3Exception (extends \Exception) instead + of \Exception. + + + + The SQLite error code is now passed in the exception error code instead of + being included in the error message. + + + + + + + Changes to INI File Handling + + + + + The assert.* INI settings have been deprecated. + This comprises the following INI settings: + + assert.active + assert.bail + assert.callback + assert.exception + assert.warning + + If the value of the setting is equal to the default value, no deprecation + notice is emitted. + The zend.assertions INI setting should be used instead. + + + + + zend.max_allowed_stack_size + is a new INI directive to set the maximum allowed stack size. Possible + values are 0 (detect the process or thread maximum stack size), `-1` + (no limit), or a positive number of bytes. The default is 0. When it + is not possible to detect the the process or thread maximum stack size, + a known system default is used. Setting this value too high has the same + effect as disabling the stack size limit. Fibers use fiber.stack_size + as maximum allowed stack size. An Error is thrown when the process call + stack exceeds `zend.max_allowed_stack_size-zend.reserved_stack_size` + bytes, to prevent stack-overflow-induced segmentation faults, with + the goal of making debugging easier. The stack size increases during + uncontrolled recursions involving internal functions or the magic methods + __toString, __clone, __sleep, __destruct. This is not related to stack + buffer overflows, and is not a security feature. + + + + + zend.reserved_stack_size + is a new INI directive to set the reserved stack size, in bytes. This is + subtracted from the max allowed stack size, as a buffer, when checking the + stack size. + + + + + + + Performance + + + DOM + + + Looping over a DOMNodeList now uses caching. Therefore requesting items no + longer takes quadratic time by default. + + + + Getting text content from nodes now avoids an allocation, resulting in a + performance gain. + + + + DOMChildNode::remove now runs in O(1) performance. + + + + + Standard + + + The file flags error check is now about 7% faster. + + + + + SPL + + + RecursiveDirectoryIterator now performs less I/O when looping over a + directory. + + + + + + From c701b6d9df5d6c1269a63ceae91c7729f7ccb174 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Fri, 22 Sep 2023 21:49:21 +0900 Subject: [PATCH 04/25] fixed some libcurl constants version --- appendices/migration83/constants.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appendices/migration83/constants.xml b/appendices/migration83/constants.xml index 11bed37ee9e2..bcc55864efde 100644 --- a/appendices/migration83/constants.xml +++ b/appendices/migration83/constants.xml @@ -63,22 +63,22 @@ - CURLKHMATCH_OK (libcurl >= 7.84.0) + CURLKHMATCH_OK (libcurl >= 7.19.6) - CURLKHMATCH_MISMATCH (libcurl >= 7.84.0) + CURLKHMATCH_MISMATCH (libcurl >= 7.19.6) - CURLKHMATCH_MISSING (libcurl >= 7.84.0) + CURLKHMATCH_MISSING (libcurl >= 7.19.6) - CURLKHMATCH_LAST (libcurl >= 7.84.0) + CURLKHMATCH_LAST (libcurl >= 7.19.6) From 866b4afc07b90b116a75ee10627409cbd29d0e06 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Fri, 22 Sep 2023 21:53:59 +0900 Subject: [PATCH 05/25] fixed whitespace --- appendices/migration83/other-changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index 0459f3f8aca4..740bf0965c34 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -122,7 +122,7 @@ IntlChar::enumCharNames is now returning a boolean. - Previously it returned &null; on success and &false; on failure. + Previously it returned &null; on success and &false; on failure. From 8284f79f7d752d975b3238bf6327c5e2ea9a22e0 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 23 Sep 2023 13:10:47 +0900 Subject: [PATCH 06/25] Update appendices/migration83/[other-changes|incompatible|deprecated].xml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus Co-authored-by: George Peter Banyard --- appendices/migration83/deprecated.xml | 14 ++++++++------ appendices/migration83/incompatible.xml | 2 +- appendices/migration83/other-changes.xml | 24 ++++++++++++------------ 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/appendices/migration83/deprecated.xml b/appendices/migration83/deprecated.xml index f524101ee6df..edc6f1c6185c 100644 --- a/appendices/migration83/deprecated.xml +++ b/appendices/migration83/deprecated.xml @@ -33,7 +33,7 @@ DBA - Calling dba_fetch with $dba as the 3rd argument is now deprecated. + Calling dba_fetch with $dba as the 3rd argument is now deprecated. @@ -52,8 +52,10 @@ Intl - The U_MULTIPLE_DECIMAL_SEP*E*RATORS constant had been deprecated, using - the U_MULTIPLE_DECIMAL_SEP*A*RATORS instead is recommended. + The U_MULTIPLE_DECIMAL_SEP*E*RATORS + constant had been deprecated, using the + U_MULTIPLE_DECIMAL_SEP*A*RATORS + constant instead is recommended. The NumberFormatter::TYPE_CURRENCY has been deprecated. @@ -73,7 +75,7 @@ MBString - Passing a negative $width to mb_strimwidth is now deprecated. + Passing a negative $width to mb_strimwidth is now deprecated. @@ -101,7 +103,7 @@ Calling ReflectionProperty::setValue with only one parameter is deprecated. - To set static properties, pass null as the first parameter. + To set static properties, pass &null; as the first parameter. @@ -123,7 +125,7 @@ Using exceptions is now preferred, warnings will be removed in the future. - Calling SQLite3::enableExceptions(false) will trigger a depreciation + Calling SQLite3::enableExceptions(false) will trigger a deprecation warning in this version. diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index c7ec3534e9c9..87f20d4b3ab7 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -76,7 +76,7 @@ DOMDocument::createAttributeNS would previously incorrectly throw a NAMESPACE_ERR - when the prefix was already used for a different uri. It now correctly + when the prefix was already used for a different URI. It now correctly chooses a different prefix when there's a prefix name conflict. diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index 740bf0965c34..d30fcd5548ae 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -91,7 +91,7 @@ DOMDocument::loadHTML, DOMDocument::loadHTMLFile, DOMDocument::loadXML and DOMDocument::loadXMLFile now have a tentative return type of bool. Previously, this was documented as having a return - type of DOMDocument|bool, but DOMDocument cannot be returned since PHP 8.0 + type of DOMDocument|bool, but DOMDocument cannot be returned since PHP 8.0 as it is no longer statically callable. @@ -194,7 +194,7 @@ ODBC - odbc_autocommit now accepts null for the $enable parameter. + odbc_autocommit now accepts &null; for the $enable parameter. Passing &null; has the same behaviour as passing only 1 parameter, namely indicating if the autocommit feature is enabled or not. @@ -231,8 +231,8 @@ Changed mt_srand and srand to not check the number of arguments to - determine whether a random seed should be used. Passing null will generate - a random seed, 0 will use zero as the seed. The functions are now + determine whether a random seed should be used. Passing &null; will generate + a random seed, 0 will use zero as the seed. The functions are now consistent with Mt19937::__construct. @@ -250,12 +250,12 @@ Standard - E_NOTICEs emitted by unserialize have been promoted to E_WARNING. + E_NOTICEs emitted by unserialize have been promoted to E_WARNING. - unserialize now emits a new E_WARNING if the input contains unconsumed + unserialize now emits a new E_WARNING if the input contains unconsumed bytes. @@ -267,13 +267,13 @@ - strtok raises a warning in the case token is not provided when starting + strtok raises an E_WARNING in the case token is not provided when starting tokenization. - password_hash will now chain the underlying Random\RandomException - as the ValueError’s $previous Exception when salt generation fails. + password_hash will now chain the underlying Random\RandomException + as the ValueError’s $previous Exception when salt generation fails. @@ -335,8 +335,8 @@ SQLite3 - The SQLite3 class now throws \SQLite3Exception (extends \Exception) instead - of \Exception. + The SQLite3 class now throws SQLite3Exception (extends Exception) instead + of Exception. @@ -353,7 +353,7 @@ - The assert.* INI settings have been deprecated. + The assert.* INI settings have been deprecated. This comprises the following INI settings: assert.active From 72795d57d31242056e76420060478662cb887a33 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 23 Sep 2023 14:10:36 +0900 Subject: [PATCH 07/25] missing tag tweaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus Co-authored-by: George Peter Banyard --- appendices/migration83/incompatible.xml | 2 +- appendices/migration83/other-changes.xml | 30 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 87f20d4b3ab7..4b79e5f50ed3 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -84,7 +84,7 @@ New methods and properties were added to some DOM classes. If you inherit from these and you happen to have a method or property with the same name, you might encounter errors if the declaration is incompatible. - New Features and New Functions for a list of + See the list of new features and few functions for a list of the newly implemented methods and properties. diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index d30fcd5548ae..ab007d87acf1 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -43,9 +43,9 @@ Setting open_basedir at runtime using ini_set('open_basedir', ...); no - longer accepts paths containing the parent directory (`..`). Previously, - only paths starting with `..` were disallowed. This could easily be - circumvented by prepending `./` to the path. + longer accepts paths containing the parent directory (..). Previously, + only paths starting with .. were disallowed. This could easily be + circumvented by prepending ./ to the path. @@ -53,7 +53,7 @@ - The resultant HTML of highlight_string and highlight_file has changed. + The resultant HTML of highlight_string and highlight_file has changed. Whitespace between outer HTML tags is removed. Newlines and spaces are no longer converted to HTML entities. The whole HTML is now wrapped in <pre> tag. The outer <span> has been merged with <code>. @@ -101,7 +101,7 @@ Gd - Changed imagerotate signature, removed the `ignore_transparent` argument + Changed imagerotate signature, removed the ignore_transparent argument as it was not used internally anyway from PHP 7.x. @@ -174,13 +174,13 @@ mysqli - mysqli_fetch_object now raises a ValueError instead of an Exception when - the constructor_args argument is non empty with the class not having + mysqli_fetch_object now raises a ValueError instead of an Exception when + the constructor_args argument is non empty with the class not having constructor. - mysqli_poll now raises a ValueError when the read nor error arguments are + mysqli_poll now raises a ValueError when the read nor error arguments are passed. @@ -204,19 +204,19 @@ PGSQL - pg_fetch_object now raises a ValueError instead of an Exception when the + pg_fetch_object now raises a ValueError instead of an Exception when the constructor_args argument is non empty with the class not having constructor. - pg_insert now raises a ValueError instead of a WARNING when the table + pg_insert now raises a ValueError instead of a E_WARNING when the table specified is invalid. - pg_insert and pg_convert raises a ValueError or a TypeError instead of a - WARNING when the value/type of a field does not match properly with a + pg_insert and pg_convert raises a ValueError or a TypeError instead of a + E_WARNING when the value/type of a field does not match properly with a PostgreSQL's type. @@ -233,7 +233,7 @@ Changed mt_srand and srand to not check the number of arguments to determine whether a random seed should be used. Passing &null; will generate a random seed, 0 will use zero as the seed. The functions are now - consistent with Mt19937::__construct. + consistent with Random\Engine\Mt19937::__construct. @@ -318,7 +318,7 @@ Internal objects that implement an _IS_NUMBER cast but not a do_operator handler that overrides addition and subtraction now can be incremented - and decrement as if one would do $o += 1 or $o -= 1 + and decrement as if one would do $o += 1 or $o -= 1 @@ -371,7 +371,7 @@ zend.max_allowed_stack_size is a new INI directive to set the maximum allowed stack size. Possible - values are 0 (detect the process or thread maximum stack size), `-1` + values are 0 (detect the process or thread maximum stack size), -1 (no limit), or a positive number of bytes. The default is 0. When it is not possible to detect the the process or thread maximum stack size, a known system default is used. Setting this value too high has the same From 59411bd80f824bf99d7e7a453824ce8f31a22b6d Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 23 Sep 2023 14:36:50 +0900 Subject: [PATCH 08/25] added assert* deprecated change to deprecated.xml --- appendices/migration83/deprecated.xml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/appendices/migration83/deprecated.xml b/appendices/migration83/deprecated.xml index edc6f1c6185c..39ce9fba1f27 100644 --- a/appendices/migration83/deprecated.xml +++ b/appendices/migration83/deprecated.xml @@ -28,15 +28,14 @@ deprecated. + - - DBA - - - Calling dba_fetch with $dba as the 3rd argument is now deprecated. - - + + DBA + + Calling dba_fetch with $dba as the 3rd argument is now deprecated. + @@ -117,6 +116,11 @@ The ASSERT_ACTIVE, ASSERT_BAIL, ASSERT_CALLBACK, ASSERT_EXCEPTION, and ASSERT_WARNING constants have been deprecated. + + + The assert.* INI settings have been deprecated. + See the Changes to INI File Handling page for further details. + From f80adcf26c365b1c382d3e0c0807558372e283dc Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 23 Sep 2023 14:53:21 +0900 Subject: [PATCH 09/25] added missing clsasname|literal tags --- appendices/migration83/incompatible.xml | 22 +++++++++++----------- appendices/migration83/other-changes.xml | 18 +++++++++--------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 4b79e5f50ed3..980eede026ee 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -117,7 +117,7 @@ Phar - The type of Phar class constants are now declared. + The type of Phar class constants are now declared. @@ -127,16 +127,16 @@ The range function has had various changes: - A TypeError is now thrown when passing objects, resources, or arrays + A TypeError is now thrown when passing objects, resources, or arrays as the boundary inputs. - A more descriptive ValueError is thrown when passing 0 for $step. - A ValueError is now thrown when using a negative $step for increasing ranges. - If $step is a float that can be interpreted as an int, it is now done so. - A ValueError is now thrown if any argument is infinity or NAN. - An E_WARNING is now emitted if $start or $end is the empty string. The value continues to be cast to the value 0. - An E_WARNING is now emitted if $start or $end has more than one byte, only if it is a non-numeric string. - An E_WARNING is now emitted if $start or $end is cast to an integer because the other boundary input is a number. (e.g. range(5, 'z');). - An E_WARNING is now emitted if $step is a float when trying to generate a range of characters, except if both boundary inputs are numeric strings (e.g. range('5', '9', 0.5); does not produce a warning). + A more descriptive ValueError is thrown when passing 0 for $step. + A ValueError is now thrown when using a negative $step for increasing ranges. + If $step is a float that can be interpreted as an int, it is now done so. + A ValueError is now thrown if any argument is infinity or NAN. + An E_WARNING is now emitted if $start or $end is the empty string. The value continues to be cast to the value 0. + An E_WARNING is now emitted if $start or $end has more than one byte, only if it is a non-numeric string. + An E_WARNING is now emitted if $start or $end is cast to an integer because the other boundary input is a number. (e.g. range(5, 'z');). + An E_WARNING is now emitted if $step is a float when trying to generate a range of characters, except if both boundary inputs are numeric strings (e.g. range('5', '9', 0.5); does not produce a warning). range now produce a list of characters if one of the boundary inputs is a string digit instead of casting the other input to int (e.g. range('5', 'z');). @@ -150,7 +150,7 @@ SNMP - The type of SNMP class constants are now declared. + The type of SNMP class constants are now declared. diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index ab007d87acf1..6a2b9b3e0712 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -26,14 +26,14 @@ gc_status has added the following 8 fields: - "running" => bool - "protected" => bool - "full" => bool - "buffer_size" => int - "application_time" => float: Total application time, in seconds (including collector_time) - "collector_time" => float: Time spent collecting cycles, in seconds (including destructor_time and free_time) - "destructor_time" => float: Time spent executing destructors during cycle collection, in seconds - "free_time" => float: Time spent freeing values during cycle collection, in seconds + "running" => bool + "protected" => bool + "full" => bool + "buffer_size" => int + "application_time" => float: Total application time, in seconds (including collector_time) + "collector_time" => float: Time spent collecting cycles, in seconds (including destructor_time and free_time) + "destructor_time" => float: Time spent executing destructors during cycle collection, in seconds + "free_time" => float: Time spent freeing values during cycle collection, in seconds @@ -56,7 +56,7 @@ The resultant HTML of highlight_string and highlight_file has changed. Whitespace between outer HTML tags is removed. Newlines and spaces are no longer converted to HTML entities. The whole HTML is now wrapped in - <pre> tag. The outer <span> has been merged with <code>. + <pre> tag. The outer <span> has been merged with <code>. From c76190fd81694d64a654c297471452e46ee21cd2 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 23 Sep 2023 15:07:18 +0900 Subject: [PATCH 10/25] added assert.* ini setting link --- appendices/migration83/other-changes.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index 6a2b9b3e0712..f633cc26feee 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -356,11 +356,11 @@ The assert.* INI settings have been deprecated. This comprises the following INI settings: - assert.active - assert.bail - assert.callback - assert.exception - assert.warning + assert.active + assert.bail + assert.callback + assert.exception + assert.warning If the value of the setting is equal to the default value, no deprecation notice is emitted. From 9dd57ed9099e704dbcf7bc24ca81f9b8376e7321 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 23 Sep 2023 15:40:34 +0900 Subject: [PATCH 11/25] tweaked for lines to be broken down into 80 character long --- appendices/migration83/constants.xml | 13 +- appendices/migration83/deprecated.xml | 44 ++-- appendices/migration83/incompatible.xml | 96 ++++++--- appendices/migration83/new-features.xml | 32 ++- appendices/migration83/new-functions.xml | 3 +- appendices/migration83/other-changes.xml | 262 +++++++++++++---------- 6 files changed, 272 insertions(+), 178 deletions(-) diff --git a/appendices/migration83/constants.xml b/appendices/migration83/constants.xml index bcc55864efde..716afe057ee4 100644 --- a/appendices/migration83/constants.xml +++ b/appendices/migration83/constants.xml @@ -89,10 +89,12 @@ - MIXED_NUMBERS (Spoofchecker) + MIXED_NUMBERS + (Spoofchecker) - HIDDEN_OVERLAY (Spoofchecker) + HIDDEN_OVERLAY + (Spoofchecker) @@ -288,7 +290,8 @@ - ZipArchive::AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE (libzip >= 1.10) + ZipArchive::AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE + (libzip >= 1.10) @@ -298,7 +301,9 @@ - ZipArchive::LENGTH_TO_END as default value for ZipArchive::addFile and ZipArchive::replaceFile + ZipArchive::LENGTH_TO_END as default value for + ZipArchive::addFile and + ZipArchive::replaceFile diff --git a/appendices/migration83/deprecated.xml b/appendices/migration83/deprecated.xml index 39ce9fba1f27..4c70247ab8c3 100644 --- a/appendices/migration83/deprecated.xml +++ b/appendices/migration83/deprecated.xml @@ -11,7 +11,8 @@ Using the ++ operator on empty, non-numeric, or non-alphanumeric strings is now deprecated. Moreover, incrementing non-numeric strings is soft - deprecated and the new str_increment function should be used instead. + deprecated and the new str_increment function should + be used instead. @@ -24,8 +25,8 @@ get_class()/get_parent_class() call without arguments - Calling get_class and get_parent_class without arguments is now - deprecated. + Calling get_class and get_parent_class + without arguments is now deprecated. @@ -34,7 +35,8 @@ DBA - Calling dba_fetch with $dba as the 3rd argument is now deprecated. + Calling dba_fetch with $dba as + the 3rd argument is now deprecated. @@ -42,8 +44,8 @@ FFI - Calling FFI::cast, FFI::new, and FFI::type statically is now - deprecated. + Calling FFI::cast, FFI::new, + and FFI::type statically is now deprecated. @@ -65,7 +67,8 @@ LDAP - Calling ldap_connect with separate hostname and port is deprecated. + Calling ldap_connect with separate hostname and port is + deprecated. @@ -74,7 +77,8 @@ MBString - Passing a negative $width to mb_strimwidth is now deprecated. + Passing a negative $width to + mb_strimwidth is now deprecated. @@ -82,8 +86,8 @@ Phar - Calling Phar::setStub with a resource and a length is now deprecated. - Such calls should be replaced by: + Calling Phar::setStub with a resource and a length + is now deprecated. Such calls should be replaced by: $phar->setStub(stream_get_contents($resource)); @@ -101,7 +105,8 @@ Reflection - Calling ReflectionProperty::setValue with only one parameter is deprecated. + Calling ReflectionProperty::setValue with only one + parameter is deprecated. To set static properties, pass &null; as the first parameter. @@ -113,13 +118,16 @@ The assert_options function is now deprecated. - The ASSERT_ACTIVE, ASSERT_BAIL, ASSERT_CALLBACK, ASSERT_EXCEPTION, and - ASSERT_WARNING constants have been deprecated. + The ASSERT_ACTIVE, ASSERT_BAIL, + ASSERT_CALLBACK, ASSERT_EXCEPTION, + and ASSERT_WARNING constants have been deprecated. The assert.* INI settings have been deprecated. - See the Changes to INI File Handling page for further details. + See the + Changes to INI File Handling + page for further details. @@ -129,8 +137,8 @@ Using exceptions is now preferred, warnings will be removed in the future. - Calling SQLite3::enableExceptions(false) will trigger a deprecation - warning in this version. + Calling SQLite3::enableExceptions(false) will trigger a + deprecation warning in this version. @@ -138,8 +146,8 @@ Zip - The ZipArchive::FL_RECOMPRESS constant is deprecated and will be removed - in a future version of libzip. + The ZipArchive::FL_RECOMPRESS constant is deprecated + and will be removed in a future version of libzip. diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 980eede026ee..855894b7fec1 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -13,10 +13,12 @@ - Executing proc_get_status multiple times will now always return the right - value on posix systems. Previously, only the first call of the function - returned the right value. Executing proc_close after proc_get_status - will now also return the right exit code. Previously this would return -1. + Executing proc_get_status multiple times will now always + return the right value on posix systems. Previously, only the first call + of the function returned the right value. Executing + proc_close after proc_get_status + will now also return the right exit code. Previously this would return + -1. Internally, this works by caching the result on posix systems. If you want the old behaviour, you can check the "cached" key in the array returned by proc_get_status to check whether the result was cached. @@ -45,9 +47,10 @@ - WeakMap entries whose key maps to itself (possibly transitively) may now - be removed during cycle collection if the key is not reachable except by - iterating over the WeakMap (reachability via iteration is considered weak). + WeakMap entries whose key maps to itself (possibly + transitively) may now be removed during cycle collection if the key is not + reachable except by iterating over the WeakMap (reachability via iteration is + considered weak). Previously, such entries would never be automatically removed. @@ -57,36 +60,41 @@ DOM - DOMChildNode::after, DOMChildNode::before, DOMChildNode::replaceWith + DOMChildNode::after, + DOMChildNode::before, + DOMChildNode::replaceWith on a node that has no parent is now a no-op instead of a hierarchy exception, which is the behaviour spec demands. - Using the DOMParentNode and DOMChildNode methods without a document now - works instead of throwing a HIERARCHY_REQUEST_ERR DOMException. This is in - line with the behaviour spec demands. + Using the DOMParentNode + and DOMChildNode methods without a document now + works instead of throwing a HIERARCHY_REQUEST_ERR + DOMException. + This is in line with the behaviour spec demands. - DOMDocument::createAttributeNS without specifying a prefix would incorrectly create - a default namespace, placing the element inside the namespace instead of - the attribute. This bug is now fixed. + DOMDocument::createAttributeNS without specifying + a prefix would incorrectly create a default namespace, placing the element + inside the namespace instead of the attribute. This bug is now fixed. - DOMDocument::createAttributeNS would previously incorrectly throw a NAMESPACE_ERR - when the prefix was already used for a different URI. It now correctly - chooses a different prefix when there's a prefix name conflict. + DOMDocument::createAttributeNS would previously + incorrectly throw a NAMESPACE_ERR when the prefix was already used for a + different URI. It now correctly chooses a different prefix when there's a + prefix name conflict. New methods and properties were added to some DOM classes. If you inherit from these and you happen to have a method or property with the same name, you might encounter errors if the declaration is incompatible. - See the list of new features and few functions for a list of the - newly implemented methods and properties. - + See the list of new features + and few functions for + a list of the newly implemented methods and properties. @@ -103,9 +111,10 @@ Opcache - The opcache.consistency_checks INI directive was removed. This feature was - broken with the tracing JIT, as well as with inheritance cache, and has - been disabled without a way to enable it since PHP 8.1.18 and PHP 8.2.5. + The opcache.consistency_checks + INI directive was removed. This feature was broken with the tracing JIT, + as well as with inheritance cache, and has been disabled without a way to + enable it since PHP 8.1.18 and PHP 8.2.5. Both the tracing JIT and inheritance cache may modify shm after the script has been persisted by invalidating its checksum. The attempted fix skipped over the modifiable pointers but was rejected due to complexity. For this @@ -127,22 +136,39 @@ The range function has had various changes: - A TypeError is now thrown when passing objects, resources, or arrays - as the boundary inputs. - A more descriptive ValueError is thrown when passing 0 for $step. - A ValueError is now thrown when using a negative $step for increasing ranges. - If $step is a float that can be interpreted as an int, it is now done so. - A ValueError is now thrown if any argument is infinity or NAN. - An E_WARNING is now emitted if $start or $end is the empty string. The value continues to be cast to the value 0. - An E_WARNING is now emitted if $start or $end has more than one byte, only if it is a non-numeric string. - An E_WARNING is now emitted if $start or $end is cast to an integer because the other boundary input is a number. (e.g. range(5, 'z');). - An E_WARNING is now emitted if $step is a float when trying to generate a range of characters, except if both boundary inputs are numeric strings (e.g. range('5', '9', 0.5); does not produce a warning). - range now produce a list of characters if one of the boundary inputs is a string digit instead of casting the other input to int (e.g. range('5', 'z');). + A TypeError is now thrown when passing objects, + resources, or arrays as the boundary inputs. + A more descriptive ValueError is thrown when + passing 0 for $step. + A ValueError is now thrown when using a + negative $step for increasing ranges. + If $step is a float that can be interpreted + as an int, it is now done so. + A ValueError is now thrown if any argument + is infinity or NAN. + An E_WARNING is now emitted if + $start or $end is the empty + string. The value continues to be cast to the value 0. + An E_WARNING is now emitted if + $start or $end has more than + one byte, only if it is a non-numeric string. + An E_WARNING is now emitted if + $start or $end is cast to an + integer because the other boundary input is a number. + (e.g. range(5, 'z');). + An E_WARNING is now emitted if + $step is a float when trying to generate a range of + characters, except if both boundary inputs are numeric strings (e.g. + range('5', '9', 0.5); does not produce a warning). + range now produce a list of characters if one + of the boundary inputs is a string digit instead of casting the other input + to int (e.g. range('5', 'z');). - The file flags error check now catches all invalid flags. Notably FILE_APPEND was previously silently accepted. + The file flags error check now catches all invalid flags. + Notably FILE_APPEND was previously silently accepted. diff --git a/appendices/migration83/new-features.xml b/appendices/migration83/new-features.xml index ec4e222175e2..ca920365312b 100644 --- a/appendices/migration83/new-features.xml +++ b/appendices/migration83/new-features.xml @@ -47,7 +47,8 @@ Override Attribute - Added the #[\Override] attribute to check that a method exists in a parent class or implemented interface. + Added the #[\Override] attribute to check that a method exists in a parent + class or implemented interface. @@ -56,8 +57,8 @@ Fetch class constant dynamically syntax - Class constants can now be accessed dynamically using the C::{$name} - syntax. + Class constants can now be accessed dynamically using the + C::{$name} syntax. @@ -86,7 +87,8 @@ Added properties DOMElement::$className and DOMElement::$id. - These are not binary-safe at the moment because of underlying limitations of libxml2. + These are not binary-safe at the moment because of underlying limitations + of libxml2. This means that the property values will be cut off at a NUL byte. @@ -95,7 +97,8 @@ FFI - It is now possible to assign FFI/CData to other FFI/CData. This means you can now assign CData to structs and fields. + It is now possible to assign FFI/CData to other FFI/CData. This means you + can now assign CData to structs and fields. @@ -103,7 +106,11 @@ Opcache - opcache_get_status()['scripts'][n]['revalidate'] now contains a Unix timestamp of when the next revalidation of the scripts timestamp is due,dictated by the opcache.revalidate_freq INI directive. + opcache_get_status()['scripts'][n]['revalidate'] now contains + a Unix timestamp of when the next revalidation of the scripts timestamp is + due, dictated by the + opcache.revalidate_freq + INI directive. @@ -111,15 +118,19 @@ POSIX - posix_getrlimit now takes an optional $res parameter to allow fetching a single resource limit. + posix_getrlimit now takes an optional + $res parameter to allow fetching a single resource limit. - posix_isatty now raises type warnings for integers following the usual ZPP semantics. + posix_isatty now raises type warnings for integers + following the usual ZPP semantics. - posix_ttyname now raises type warnings for integers following the usual ZPP semantics and value warnings for invalid file descriptor integers. + posix_ttyname now raises type warnings for integers + following the usual ZPP semantics and value warnings for invalid file + descriptor integers. @@ -127,7 +138,8 @@ Streams - Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was previously not implemented. + Streams can now emit the STREAM_NOTIFY_COMPLETED + notification. This was previously not implemented. diff --git a/appendices/migration83/new-functions.xml b/appendices/migration83/new-functions.xml index 8d14fab5e31b..77736b6225cc 100644 --- a/appendices/migration83/new-functions.xml +++ b/appendices/migration83/new-functions.xml @@ -93,7 +93,8 @@ PostgreSQL - pg_set_error_context_visibility (libpq >= 9.6) + pg_set_error_context_visibility + (libpq >= 9.6) pg_enter_pipeline_mode pg_exit_pipeline_mode pg_pipeline_sync diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index f633cc26feee..c6cafb8dc5b9 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -9,9 +9,11 @@ CLI - The STDOUT, STDERR and STDIN streams are no longer closed on resource destruction - which is mostly when the CLI finishes. It is however still possible to - explicitly close those streams using fclose and similar. + The STDOUT, STDERR and + STDIN streams are no longer closed on resource + destruction which is mostly when the CLI finishes. + It is however still possible to explicitly close those streams using + fclose and similar. @@ -30,22 +32,28 @@ "protected" => bool "full" => bool "buffer_size" => int - "application_time" => float: Total application time, in seconds (including collector_time) - "collector_time" => float: Time spent collecting cycles, in seconds (including destructor_time and free_time) - "destructor_time" => float: Time spent executing destructors during cycle collection, in seconds - "free_time" => float: Time spent freeing values during cycle collection, in seconds + "application_time" => float: Total application + time, in seconds (including collector_time) + "collector_time" => float: Time spent collecting + cycles, in seconds (including destructor_time and free_time) + "destructor_time" => float: Time spent executing + destructors during cycle collection, in seconds + "free_time" => float: Time spent freeing values + during cycle collection, in seconds - class_alias now supports creating an alias of an internal class. + class_alias now supports creating an alias of an + internal class. - Setting open_basedir at runtime using ini_set('open_basedir', ...); no - longer accepts paths containing the parent directory (..). Previously, - only paths starting with .. were disallowed. This could easily be - circumvented by prepending ./ to the path. + Setting open_basedir at runtime + using ini_set('open_basedir', ...); no longer accepts paths + containing the parent directory (..). Previously, + only paths starting with .. were disallowed. This could + easily be circumvented by prepending ./ to the path. @@ -53,10 +61,12 @@ - The resultant HTML of highlight_string and highlight_file has changed. + The resultant HTML of highlight_string and + highlight_file has changed. Whitespace between outer HTML tags is removed. Newlines and spaces are no longer converted to HTML entities. The whole HTML is now wrapped in - <pre> tag. The outer <span> has been merged with <code>. + <pre> tag. The outer <span> + has been merged with <code>. @@ -65,8 +75,9 @@ Calendar - easter_date now supports years from 1970 to 2,000,000,000 on 64-bit - systems, previously it only supported years in the range from 1970 to 2037. + easter_date now supports years from 1970 to + 2,000,000,000 on 64-bit systems, previously it only supported years in the + range from 1970 to 2037. @@ -74,9 +85,11 @@ Curl - curl_getinfo now supports two new constants: CURLINFO_CAPATH and - CURLINFO_CAINFO. If option is &null;, the following two additional keys are - present: "capath" and "cainfo". + curl_getinfo now supports two new constants: + CURLINFO_CAPATH and + CURLINFO_CAINFO. If option is &null;, the following + two additional keys are present: + "capath" and "cainfo". @@ -84,15 +97,18 @@ DOM - Changed DOMCharacterData::appendData tentative return type to true. + Changed DOMCharacterData::appendData tentative + return type to true. - DOMDocument::loadHTML, DOMDocument::loadHTMLFile, - DOMDocument::loadXML and DOMDocument::loadXMLFile now have a tentative + DOMDocument::loadHTML, + DOMDocument::loadHTMLFile, + DOMDocument::loadXML and + DOMDocument::loadXMLFile now have a tentative return type of bool. Previously, this was documented as having a return - type of DOMDocument|bool, but DOMDocument cannot be returned since PHP 8.0 - as it is no longer statically callable. + type of DOMDocument|bool, but DOMDocument + cannot be returned since PHP 8.0 as it is no longer statically callable. @@ -101,8 +117,9 @@ Gd - Changed imagerotate signature, removed the ignore_transparent argument - as it was not used internally anyway from PHP 7.x. + Changed imagerotate signature, removed the + ignore_transparent argument as it was not used + internally anyway from PHP 7.x. @@ -110,13 +127,14 @@ Intl - datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone) + datefmt_set_timezone (and its alias + IntlDateformatter::setTimeZone) now returns &true; on success, previously &null; was returned. - IntlBreakiterator::setText now returns &false; on failure, previously - &null; was returned. + IntlBreakiterator::setText now returns &false; + on failure, previously &null; was returned. now returns &true; on success, previously &null; was returned. @@ -130,43 +148,49 @@ MBString - mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional - casing rules for the Greek letter sigma. For mb_convert_case, conditional - casing only applies to MB_CASE_LOWER and MB_CASE_TITLE modes, not to - MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE. + mb_strtolower, mb_strtotitle, + and mb_convert_case implement conditional casing rules + for the Greek letter sigma. For mb_convert_case, + conditional casing only applies to MB_CASE_LOWER + and MB_CASE_TITLE modes, not to + MB_CASE_LOWER_SIMPLE and + MB_CASE_TITLE_SIMPLE. - mb_decode_mimeheader interprets underscores in QPrint-encoded MIME - encoded words as required by RFC 2047; they are converted to spaces. - Underscores must be encoded as "=5F" in such MIME encoded words. + mb_decode_mimeheader interprets underscores in + QPrint-encoded MIME encoded words as required by RFC 2047; they are + converted to spaces. + Underscores must be encoded as "=5F" in such MIME + encoded words. - In rare cases, mb_encode_mimeheader will transfer-encode its input - string where it would pass it through as raw ASCII in PHP 8.2. + In rare cases, mb_encode_mimeheader will transfer-encode + its input string where it would pass it through as raw ASCII in PHP 8.2. - mb_encode_mimeheader no longer drops NUL (zero) bytes when - QPrint-encoding the input string. This previously caused strings in - certain text encodings, especially UTF-16 and UTF-32, to be - corrupted by mb_encode_mimeheader. + mb_encode_mimeheader no longer drops NUL (zero) + bytes when QPrint-encoding the input string. + This previously caused strings in certain text encodings, especially + UTF-16 and UTF-32, to be corrupted by mb_encode_mimeheader. - mb_detect_encoding's "non-strict" mode now behaves as described in the - documentation. Previously, it would return false if the same byte - (for example, the first byte) of the input string was invalid in all - candidate encodings. More generally, it would eliminate candidate - encodings from consideration when an invalid byte was seen, and if the - same input byte eliminated all remaining encodings still under - consideration, it would return false. On the other hand, if all candidate - encodings but one were eliminated from consideration, it would return the - last remaining one without regard for how many encoding errors might be - encountered later in the string. This is different from the behavior - described in the documentation, which says: "If strict is set to false, - the closest matching encoding will be returned." + mb_detect_encoding's "non-strict" mode now behaves + as described in the documentation. + Previously, it would return false if the same byte (for example, the first + byte) of the input string was invalid in all candidate encodings. + More generally, it would eliminate candidate encodings from consideration + when an invalid byte was seen, and if the same input byte eliminated all + remaining encodings still under consideration, it would return false. + On the other hand, if all candidate encodings but one were eliminated + from consideration, it would return the last remaining one without regard + for how many encoding errors might be encountered later in the string. + This is different from the behavior described in the documentation, which + says: "If strict is set to false, the closest matching encoding will be + returned." @@ -174,18 +198,21 @@ mysqli - mysqli_fetch_object now raises a ValueError instead of an Exception when - the constructor_args argument is non empty with the class not having - constructor. + mysqli_fetch_object now raises a + ValueError instead of an Exception + when the constructor_args argument is non empty with + the class not having constructor. - mysqli_poll now raises a ValueError when the read nor error arguments are - passed. + mysqli_poll now raises a ValueError + when the read nor error arguments + are passed. - mysqli_field_seek and mysqli_result::field_seek now specify return type + mysqli_field_seek and + mysqli_result::field_seek now specify return type as true instead of bool. @@ -194,7 +221,8 @@ ODBC - odbc_autocommit now accepts &null; for the $enable parameter. + odbc_autocommit now accepts &null; for the + $enable parameter. Passing &null; has the same behaviour as passing only 1 parameter, namely indicating if the autocommit feature is enabled or not. @@ -204,24 +232,27 @@ PGSQL - pg_fetch_object now raises a ValueError instead of an Exception when the - constructor_args argument is non empty with the class not having - constructor. + pg_fetch_object now raises a + ValueError instead of an Exception + when the constructor_args argument is non empty with + the class not having constructor. - pg_insert now raises a ValueError instead of a E_WARNING when the table - specified is invalid. + pg_insert now raises a ValueError + instead of a E_WARNING when the table specified is invalid. - pg_insert and pg_convert raises a ValueError or a TypeError instead of a - E_WARNING when the value/type of a field does not match properly with a - PostgreSQL's type. + pg_insert and pg_convert raises + a ValueError or a TypeError + instead of a E_WARNING when the value/type of a field + does not match properly with a PostgreSQL's type. - The $row param of pg_fetch_result, pg_field_prtlen and + The $row param of pg_fetch_result, + pg_field_prtlen and pg_field_is_null is now nullable. @@ -230,10 +261,11 @@ Random - Changed mt_srand and srand to not check the number of arguments to - determine whether a random seed should be used. Passing &null; will generate - a random seed, 0 will use zero as the seed. The functions are now - consistent with Random\Engine\Mt19937::__construct. + Changed mt_srand and srand to + not check the number of arguments to determine whether a random seed should + be used. Passing &null; will generate a random seed, 0 + will use zero as the seed. The functions are now consistent with + Random\Engine\Mt19937::__construct. @@ -242,7 +274,8 @@ Reflection - Return type of ReflectionClass::getStaticProperties is no longer nullable. + Return type of ReflectionClass::getStaticProperties + is no longer nullable. @@ -250,60 +283,67 @@ Standard - E_NOTICEs emitted by unserialize have been promoted to E_WARNING. + E_NOTICEs emitted by unserialize + have been promoted to E_WARNING. - unserialize now emits a new E_WARNING if the input contains unconsumed - bytes. + unserialize now emits a new E_WARNING + if the input contains unconsumed bytes. - array_pad is now only limited by the maximum number of elements an array - can have. Before, it was only possible to add at most 1048576 elements at a - time. + array_pad is now only limited by the maximum number of + elements an array can have. Before, it was only possible to add at most 1048576 + elements at a time. - strtok raises an E_WARNING in the case token is not provided when starting - tokenization. + strtok raises an E_WARNING in the + case token is not provided when starting tokenization. - password_hash will now chain the underlying Random\RandomException - as the ValueError’s $previous Exception when salt generation fails. + password_hash will now chain the underlying + Random\RandomException + as the ValueError’s $previous + Exception when salt generation fails. - proc_open $command array must now have at least one non empty element. + proc_open $command array must now have at least one + non empty element. - array_sum and array_product now warn when values in the array cannot - be converted to int/float. Previously arrays and objects where ignored - whilst every other value was cast to int. Moreover, objects that define - a numeric cast (e.g. GMP) are now casted instead of ignored. + array_sum and array_product now + warn when values in the array cannot be converted to int/float. + Previously arrays and objects where ignored whilst every other value was + cast to int. Moreover, objects that define a numeric cast (e.g. GMP) are + now casted instead of ignored. - number_format $decimal parameter handles rounding to negative places. It - means that when $decimals is negative, $num is rounded to $decimals - significant digits before the decimal point. Previously negative $decimals - got silently ignored and the number got rounded to zero decimal places. + number_format $decimal parameter handles rounding to + negative places. It means that when $decimals is negative, $num is rounded + to $decimals significant digits before the decimal + point. Previously negative $decimals got silently + ignored and the number got rounded to zero decimal places. - The $before_needle argument added to strrchr which works in the same way - like its counterpart in strstr or stristr. + The $before_needle argument added to + strrchr which works in the same way like its counterpart + in strstr or stristr. - str_getcsv and fgetcsv return empty string instead of a string with - a single zero byte for the last field which contains only unterminated - enclosure. + str_getcsv and fgetcsv return empty + string instead of a string with a single zero byte for the last field which + contains only unterminated enclosure. @@ -335,8 +375,9 @@ SQLite3 - The SQLite3 class now throws SQLite3Exception (extends Exception) instead - of Exception. + The SQLite3 class now throws + SQLite3Exception (extends + Exception) instead of Exception. @@ -364,7 +405,8 @@ If the value of the setting is equal to the default value, no deprecation notice is emitted. - The zend.assertions INI setting should be used instead. + The zend.assertions INI setting + should be used instead. @@ -372,10 +414,10 @@ zend.max_allowed_stack_size is a new INI directive to set the maximum allowed stack size. Possible values are 0 (detect the process or thread maximum stack size), -1 - (no limit), or a positive number of bytes. The default is 0. When it - is not possible to detect the the process or thread maximum stack size, - a known system default is used. Setting this value too high has the same - effect as disabling the stack size limit. Fibers use fiber.stack_size + (no limit), or a positive number of bytes. The default is 0. + When it is not possible to detect the the process or thread maximum stack + size, a known system default is used. Setting this value too high has the + same effect as disabling the stack size limit. Fibers use fiber.stack_size as maximum allowed stack size. An Error is thrown when the process call stack exceeds `zend.max_allowed_stack_size-zend.reserved_stack_size` bytes, to prevent stack-overflow-induced segmentation faults, with @@ -403,8 +445,8 @@ DOM - Looping over a DOMNodeList now uses caching. Therefore requesting items no - longer takes quadratic time by default. + Looping over a DOMNodeList now uses caching. Therefore + requesting items no longer takes quadratic time by default. @@ -429,8 +471,8 @@ SPL - RecursiveDirectoryIterator now performs less I/O when looping over a - directory. + RecursiveDirectoryIterator now performs less I/O + when looping over a directory. From f1457f610e53380156f8697a73d84e819ca80030 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 24 Sep 2023 10:20:26 +0900 Subject: [PATCH 12/25] addressed review comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus Co-authored-by: George Peter Banyard --- appendices/migration83/deprecated.xml | 2 +- appendices/migration83/incompatible.xml | 6 +++--- appendices/migration83/new-classes.xml | 2 +- appendices/migration83/new-functions.xml | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/appendices/migration83/deprecated.xml b/appendices/migration83/deprecated.xml index 4c70247ab8c3..f92714c51361 100644 --- a/appendices/migration83/deprecated.xml +++ b/appendices/migration83/deprecated.xml @@ -59,7 +59,7 @@ constant instead is recommended. - The NumberFormatter::TYPE_CURRENCY has been deprecated. + The NumberFormatter::TYPE_CURRENCY constant has been deprecated. diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 855894b7fec1..f724da9dbd9f 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -7,7 +7,7 @@ Programs that were very close to overflowing the call stack may now throw an - Error when using more than + Error when using more than zend.max_allowed_stack_size-zend.reserved_stack_size bytes of stack (fiber.stack_size-zend.reserved_stack_size for fibers). @@ -60,7 +60,7 @@ DOM - DOMChildNode::after, + Calling DOMChildNode::after, DOMChildNode::before, DOMChildNode::replaceWith on a node that has no parent is now a no-op instead of a hierarchy @@ -76,7 +76,7 @@ - DOMDocument::createAttributeNS without specifying + Calling DOMDocument::createAttributeNS without specifying a prefix would incorrectly create a default namespace, placing the element inside the namespace instead of the attribute. This bug is now fixed. diff --git a/appendices/migration83/new-classes.xml b/appendices/migration83/new-classes.xml index b282a062b96b..00c84e36945b 100644 --- a/appendices/migration83/new-classes.xml +++ b/appendices/migration83/new-classes.xml @@ -10,7 +10,7 @@ - IntervalBoundary + Random\IntervalBoundary diff --git a/appendices/migration83/new-functions.xml b/appendices/migration83/new-functions.xml index 77736b6225cc..583482a359c0 100644 --- a/appendices/migration83/new-functions.xml +++ b/appendices/migration83/new-functions.xml @@ -107,11 +107,11 @@ - Randomizer::getBytesFromString + Random\Randomizer::getBytesFromString - Randomizer::nextFloat + Random\Randomizer::nextFloat - Randomizer::getFloat + Random\Randomizer::getFloat From 07998d22a3ef20f6c8c9fc8bdd3f82e2bd9d66e5 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 24 Sep 2023 15:52:09 +0900 Subject: [PATCH 13/25] more tweaks in assining negative value description, FFI incompatible. Co-authored-by: George Peter Banyard --- appendices/migration83/incompatible.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index f724da9dbd9f..981f8b5b3921 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -37,8 +37,8 @@ - Assigning a negative index n to an empty array will now make sure that the - next index is n+1 instead of 0. + Assigning a negative index $n to an empty array will now make sure that the + next index is n+1 instead of 0. @@ -102,7 +102,7 @@ FFI - C functions that have a return type of void now return null instead of + C functions that have a return type of void now return &null; instead of returning the following object object(FFI\CData:void) { } From c733dd118a1b514b590e63fb2828cf1662ea8332 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 24 Sep 2023 16:13:49 +0900 Subject: [PATCH 14/25] Adjuct tags further --- appendices/migration83/incompatible.xml | 5 +++-- appendices/migration83/new-features.xml | 6 +++--- appendices/migration83/other-changes.xml | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 981f8b5b3921..4166a81fb960 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -70,7 +70,7 @@ Using the DOMParentNode and DOMChildNode methods without a document now - works instead of throwing a HIERARCHY_REQUEST_ERR + works instead of throwing a DOM_HIERARCHY_REQUEST_ERR DOMException. This is in line with the behaviour spec demands. @@ -83,7 +83,8 @@ DOMDocument::createAttributeNS would previously - incorrectly throw a NAMESPACE_ERR when the prefix was already used for a + incorrectly throw a DOM_NAMESPACE_ERRNAMESPACE_ERR + DOMException when the prefix was already used for a different URI. It now correctly chooses a different prefix when there's a prefix name conflict. diff --git a/appendices/migration83/new-features.xml b/appendices/migration83/new-features.xml index ca920365312b..fbcb0ca3eb45 100644 --- a/appendices/migration83/new-features.xml +++ b/appendices/migration83/new-features.xml @@ -63,8 +63,8 @@ - - Static variable Initializer + + Static variable Initializers Static variable initializers can now contain arbitrary expressions. @@ -97,7 +97,7 @@ FFI - It is now possible to assign FFI/CData to other FFI/CData. This means you + It is now possible to assign FFI\CData to other FFI\CData. This means you can now assign CData to structs and fields. diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index c6cafb8dc5b9..b89e723c1a57 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -321,8 +321,8 @@ array_sum and array_product now warn when values in the array cannot be converted to int/float. Previously arrays and objects where ignored whilst every other value was - cast to int. Moreover, objects that define a numeric cast (e.g. GMP) are - now casted instead of ignored. + cast to int. Moreover, objects that define a numeric cast (e.g. + GMP) are now casted instead of ignored. From 6c4ba00845956807ce06e9b2e5609db41734ebdc Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 24 Sep 2023 16:20:57 +0900 Subject: [PATCH 15/25] followed UPGRADING changes (Move things to the right section) see https://github.com/php/php-src/commit/ce6e58cf6357ee2583da471bdb5855af9db0011d --- appendices/migration83/new-features.xml | 8 ++++++++ appendices/migration83/new-functions.xml | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/appendices/migration83/new-features.xml b/appendices/migration83/new-features.xml index fbcb0ca3eb45..f607ae5670d4 100644 --- a/appendices/migration83/new-features.xml +++ b/appendices/migration83/new-features.xml @@ -91,6 +91,14 @@ of libxml2. This means that the property values will be cut off at a NUL byte. + + + Added properties DOMNode::isConnected and DOMNameSpaceNode::isConnected. + + + + Added properties DOMNode::parentElement and DOMNameSpaceNode::parentElement. + diff --git a/appendices/migration83/new-functions.xml b/appendices/migration83/new-functions.xml index 583482a359c0..9c9f2da7af02 100644 --- a/appendices/migration83/new-functions.xml +++ b/appendices/migration83/new-functions.xml @@ -25,18 +25,10 @@ DOMNode::contains DOMNode::getRootNode - - DOMNode::isConnected DOMNode::isEqualNode - - DOMNode::parentElement DOMNameSpaceNode::contains - - DOMNameSpaceNode::isConnected - - DOMNameSpaceNode::parentElement DOMParentNode::replaceChildren From c28519bd4549e5772c2bebecc9a81b4a8578bc35 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 24 Sep 2023 21:54:38 +0900 Subject: [PATCH 16/25] Update appendices/migration83/new-features.xml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- appendices/migration83/new-features.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration83/new-features.xml b/appendices/migration83/new-features.xml index f607ae5670d4..52b24a8c4ceb 100644 --- a/appendices/migration83/new-features.xml +++ b/appendices/migration83/new-features.xml @@ -93,7 +93,7 @@ - Added properties DOMNode::isConnected and DOMNameSpaceNode::isConnected. + Added properties DOMNode::$isConnected and DOMNameSpaceNode::$isConnected. From e42599559735f9e132f4dcb36a4fcec3fef9c140 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 24 Sep 2023 21:54:53 +0900 Subject: [PATCH 17/25] Update appendices/migration83/new-features.xml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- appendices/migration83/new-features.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration83/new-features.xml b/appendices/migration83/new-features.xml index 52b24a8c4ceb..103b6c0ead60 100644 --- a/appendices/migration83/new-features.xml +++ b/appendices/migration83/new-features.xml @@ -97,7 +97,7 @@ - Added properties DOMNode::parentElement and DOMNameSpaceNode::parentElement. + Added properties DOMNode::$parentElement and DOMNameSpaceNode::$parentElement. From 6d10bbb49d4907be30434eb7767a74cfc7408208 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 24 Sep 2023 23:23:54 +0900 Subject: [PATCH 18/25] fixed Phar::setStub() parameter markup --- appendices/migration83/deprecated.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appendices/migration83/deprecated.xml b/appendices/migration83/deprecated.xml index f92714c51361..086cb726b8c6 100644 --- a/appendices/migration83/deprecated.xml +++ b/appendices/migration83/deprecated.xml @@ -86,7 +86,8 @@ Phar - Calling Phar::setStub with a resource and a length + Calling Phar::setStub with a + $resource and a $length is now deprecated. Such calls should be replaced by: $phar->setStub(stream_get_contents($resource)); From 6ee1c290f6ffd1e416d1531a195cef495caf2e90 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 24 Sep 2023 23:33:40 +0900 Subject: [PATCH 19/25] fixed varname (n+1 -> $n+1) --- appendices/migration83/incompatible.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 4166a81fb960..026e763cb7d5 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -38,7 +38,7 @@ Assigning a negative index $n to an empty array will now make sure that the - next index is n+1 instead of 0. + next index is $n+1 instead of 0. From e60aad0c15e2b2278683f09303629bcf31798852 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Mon, 25 Sep 2023 00:44:38 +0900 Subject: [PATCH 20/25] Added missing "Core Changes" section --- appendices/migration83/other-changes.xml | 61 ++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index b89e723c1a57..ed44804190b4 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -2,6 +2,67 @@ Other Changes + + Core changes + + + FFI + + + FFI::load is now allowed during preloading + when opcache.preload_user + is the current system user. Previously, + calling FFI::load was not possible + during preloading if the + opcache.preload_user + directive was set. + + + + + FPM + + + FPM CLI test now fails if the socket path is longer than supported by OS. + + + + + Opcache + + + In the CLI and phpdbg SAPIs, preloading does not require the + opcache.preload_user + directive to be set anymore when running as root. + In other SAPIs, this directive is required when running as root because + preloading is done before the SAPI switches to an unprivileged user. + FPM CLI test now fails if the socket path is longer than supported by OS. + + + + + Streams + + + Blocking fread on socket connection returns + immediately if there are any buffered data instead of waiting for more data. + + + + Memory stream no longer fails if seek offset is past the end. Instead + the memory is increase on the next write and date between the old end and + offset is filled with zero bytes in the same way how it works for files. + + + + stat access operations like + file_exists and similar will now use real + path instead of the actual stream path. This is consistent with stream + opening. + + + + Changes in SAPI Modules From c2c7f47b94316a0ff9b3d0c4617a420fa1f747da Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Mon, 25 Sep 2023 01:22:43 +0900 Subject: [PATCH 21/25] added "migration83.incompatible.core" section titles --- appendices/migration83/incompatible.xml | 123 ++++++++++++++---------- 1 file changed, 72 insertions(+), 51 deletions(-) diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 026e763cb7d5..657a3564051f 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -3,57 +3,78 @@ Backward Incompatible Changes - Core - - - Programs that were very close to overflowing the call stack may now throw an - Error when using more than - zend.max_allowed_stack_size-zend.reserved_stack_size bytes of stack - (fiber.stack_size-zend.reserved_stack_size for fibers). - - - - Executing proc_get_status multiple times will now always - return the right value on posix systems. Previously, only the first call - of the function returned the right value. Executing - proc_close after proc_get_status - will now also return the right exit code. Previously this would return - -1. - Internally, this works by caching the result on posix systems. If you want - the old behaviour, you can check the "cached" key in the array returned by - proc_get_status to check whether the result was cached. - - - - Zend Max Execution Timers is now enabled by default for ZTS builds on - Linux. - - - - Uses of traits with static properties will now redeclare static properties - inherited from the parent class. This will create a separate static - property storage for the current class. This is analogous to adding the - static property to the class directly without traits. - - - - Assigning a negative index $n to an empty array will now make sure that the - next index is $n+1 instead of 0. - - - - Class constant visibility variance is now correctly checked when inherited - from interfaces. - - - - WeakMap entries whose key maps to itself (possibly - transitively) may now be removed during cycle collection if the key is not - reachable except by iterating over the WeakMap (reachability via iteration is - considered weak). - Previously, such entries would never be automatically removed. - - + PHP Core + + + + Programs that were very close to overflowing the call stack + + Programs that were very close to overflowing the call stack may now throw an + Error when using more than + zend.max_allowed_stack_size-zend.reserved_stack_size bytes of stack + (fiber.stack_size-zend.reserved_stack_size for fibers). + + + + + Executing proc_get_status() multiple times + + Executing proc_get_status multiple times will now always + return the right value on posix systems. Previously, only the first call + of the function returned the right value. Executing + proc_close after proc_get_status + will now also return the right exit code. Previously this would return + -1. + Internally, this works by caching the result on posix systems. If you want + the old behaviour, you can check the "cached" key in the array returned by + proc_get_status to check whether the result was cached. + + + + + Zend Max Execution Timers + + Zend Max Execution Timers is now enabled by default for ZTS builds on + Linux. + + + + + Uses of traits with static properties + + Uses of traits with static properties will now redeclare static properties + inherited from the parent class. This will create a separate static + property storage for the current class. This is analogous to adding the + static property to the class directly without traits. + + + + + Assigning a negative index to an empty array + + Assigning a negative index $n to an empty array will now make sure that the + next index is $n+1 instead of 0. + + + + + Class constant visibility variance check + + Class constant visibility variance is now correctly checked when inherited + from interfaces. + + + + + WeakMap entries whose key maps to itself + + WeakMap entries whose key maps to itself (possibly + transitively) may now be removed during cycle collection if the key is not + reachable except by iterating over the WeakMap (reachability via iteration is + considered weak). + Previously, such entries would never be automatically removed. + + From c2879da0d50af680d15d2d2afb3b8da1de2f566c Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Mon, 25 Sep 2023 20:21:17 +0900 Subject: [PATCH 22/25] Apply suggestions from code review Co-authored-by: George Peter Banyard --- appendices/migration83/deprecated.xml | 12 ++-- appendices/migration83/incompatible.xml | 22 +++--- appendices/migration83/new-features.xml | 13 ++-- appendices/migration83/other-changes.xml | 88 ++++++++++++++---------- 4 files changed, 77 insertions(+), 58 deletions(-) diff --git a/appendices/migration83/deprecated.xml b/appendices/migration83/deprecated.xml index 086cb726b8c6..9ee2644676c1 100644 --- a/appendices/migration83/deprecated.xml +++ b/appendices/migration83/deprecated.xml @@ -9,14 +9,16 @@ Saner Increment/Decrement operators - Using the ++ operator on empty, non-numeric, or non-alphanumeric strings - is now deprecated. Moreover, incrementing non-numeric strings is soft - deprecated and the new str_increment function should - be used instead. + Using the increment + operator (++) on empty, non-numeric, + or non-alphanumeric strings is now deprecated. + Moreover, incrementing non-numeric strings is soft deprecated and the + new str_increment function should be used instead. - Using the -- operator on empty or non-numeric strings is now deprecated. + Using the decrement + operator (--) on empty or non-numeric strings is now deprecated. diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 657a3564051f..1d891aee1974 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -20,13 +20,14 @@ Executing proc_get_status() multiple times Executing proc_get_status multiple times will now always - return the right value on posix systems. Previously, only the first call + return the right value on POSIX systems. Previously, only the first call of the function returned the right value. Executing proc_close after proc_get_status will now also return the right exit code. Previously this would return -1. - Internally, this works by caching the result on posix systems. If you want - the old behaviour, you can check the "cached" key in the array returned by + Internally, this works by caching the result on POSIX systems. + If the previous behaviour is required, it is possible to check the + "cached" key in the array returned by proc_get_status to check whether the result was cached. @@ -85,7 +86,7 @@ DOMChildNode::before, DOMChildNode::replaceWith on a node that has no parent is now a no-op instead of a hierarchy - exception, which is the behaviour spec demands. + exception, which is the behaviour demanded by the DOM specification. @@ -93,7 +94,7 @@ and DOMChildNode methods without a document now works instead of throwing a DOM_HIERARCHY_REQUEST_ERR DOMException. - This is in line with the behaviour spec demands. + This is in line with the behaviour demanded by the DOM specification. @@ -111,9 +112,10 @@ - New methods and properties were added to some DOM classes. If you inherit - from these and you happen to have a method or property with the same name, - you might encounter errors if the declaration is incompatible. + New methods and properties were added to some DOM classes. + If a userland class inherits from these classes and declare a method or property + with the same name, the declarations must be compatible. Otherwise, a typical + compile error about incompatible declarations will be thrown. See the list of new features and few functions for a list of the newly implemented methods and properties. @@ -158,8 +160,8 @@ The range function has had various changes: - A TypeError is now thrown when passing objects, - resources, or arrays as the boundary inputs. + A TypeError is now thrown when passing objects, + resources, or arrays as the boundary inputs. A more descriptive ValueError is thrown when passing 0 for $step. A ValueError is now thrown when using a diff --git a/appendices/migration83/new-features.xml b/appendices/migration83/new-features.xml index 103b6c0ead60..b4815f3c5d3e 100644 --- a/appendices/migration83/new-features.xml +++ b/appendices/migration83/new-features.xml @@ -86,18 +86,21 @@ DOM - Added properties DOMElement::$className and DOMElement::$id. + Added properties DOMElement::$className + and DOMElement::$id. These are not binary-safe at the moment because of underlying limitations of libxml2. This means that the property values will be cut off at a NUL byte. - Added properties DOMNode::$isConnected and DOMNameSpaceNode::$isConnected. + Added properties DOMNode::$isConnected + and DOMNameSpaceNode::$isConnected. - Added properties DOMNode::$parentElement and DOMNameSpaceNode::$parentElement. + Added properties DOMNode::$parentElement + and DOMNameSpaceNode::$parentElement. @@ -105,8 +108,8 @@ FFI - It is now possible to assign FFI\CData to other FFI\CData. This means you - can now assign CData to structs and fields. + It is now possible to assign FFI\CData to other FFI\CData. + Meaning CData can now be assigned to structs and fields. diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index ed44804190b4..9b8e6a89b5e4 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -125,9 +125,9 @@ The resultant HTML of highlight_string and highlight_file has changed. Whitespace between outer HTML tags is removed. Newlines and spaces - are no longer converted to HTML entities. The whole HTML is now wrapped in + are no longer converted to HTML entities. The whole HTML is now wrapped in a <pre> tag. The outer <span> - has been merged with <code>. + tag has been merged with the <code> tag. @@ -159,7 +159,7 @@ Changed DOMCharacterData::appendData tentative - return type to true. + return type to true. @@ -167,9 +167,10 @@ DOMDocument::loadHTMLFile, DOMDocument::loadXML and DOMDocument::loadXMLFile now have a tentative - return type of bool. Previously, this was documented as having a return - type of DOMDocument|bool, but DOMDocument - cannot be returned since PHP 8.0 as it is no longer statically callable. + return type of bool. Previously, this was documented as having a return + type of DOMDocument|bool, but, as of PHP 8.0.0, + DOMDocument + cannot be returned as it is no longer statically callable. @@ -178,9 +179,9 @@ Gd - Changed imagerotate signature, removed the - ignore_transparent argument as it was not used - internally anyway from PHP 7.x. + The signature of imagerotate has changed. + The ignore_transparent parameter has been removed, + as it was ignored since PHP 5.5.0. @@ -267,14 +268,14 @@ mysqli_poll now raises a ValueError - when the read nor error arguments - are passed. + when the neither the read + nor the error arguments are passed. mysqli_field_seek and - mysqli_result::field_seek now specify return type - as true instead of bool. + mysqli_result::field_seek now specify the return + type as true instead of bool. @@ -312,8 +313,9 @@ - The $row param of pg_fetch_result, - pg_field_prtlen and + The $row parameter of + pg_fetch_result, + pg_field_prtlen, and pg_field_is_null is now nullable. @@ -369,13 +371,15 @@ password_hash will now chain the underlying Random\RandomException - as the ValueError’s $previous + as the ValueError’s $previous Exception when salt generation fails. - proc_open $command array must now have at least one - non empty element. + If using an array as the $command + for proc_open, it must now have at least one + non empty element. Otherwise a ValueError + is thrown. @@ -396,15 +400,15 @@ - The $before_needle argument added to - strrchr which works in the same way like its counterpart - in strstr or stristr. + A new $before_needle argument has been added to + strrchr. It behaves like its counterpart in the + strstr or stristr functions. - str_getcsv and fgetcsv return empty - string instead of a string with a single zero byte for the last field which - contains only unterminated enclosure. + str_getcsv and fgetcsv now return + an empty string instead of a string with a single null byte for the last field + which only contains an unterminated enclosure. @@ -473,27 +477,35 @@ zend.max_allowed_stack_size - is a new INI directive to set the maximum allowed stack size. Possible - values are 0 (detect the process or thread maximum stack size), -1 - (no limit), or a positive number of bytes. The default is 0. + is a new INI directive to set the maximum allowed stack size. + Possible values are 0 (detect the process or thread maximum stack size), + -1 (no limit), or a positive number of bytes. + The default is 0. When it is not possible to detect the the process or thread maximum stack - size, a known system default is used. Setting this value too high has the - same effect as disabling the stack size limit. Fibers use fiber.stack_size - as maximum allowed stack size. An Error is thrown when the process call - stack exceeds `zend.max_allowed_stack_size-zend.reserved_stack_size` + size, a known system default is used. + Setting this value too high has the same effect as disabling the stack size limit. + Fibers use + fiber.stack_size + as maximum allowed stack size. + An Error is thrown when the process call stack exceeds + zend.max_allowed_stack_size-zend.reserved_stack_size bytes, to prevent stack-overflow-induced segmentation faults, with - the goal of making debugging easier. The stack size increases during - uncontrolled recursions involving internal functions or the magic methods - __toString, __clone, __sleep, __destruct. This is not related to stack - buffer overflows, and is not a security feature. + the goal of making debugging easier. + The stack size increases during uncontrolled recursions involving internal functions + or the magic methods + __toString(), + __clone(), + __sleep(), + __destruct(). + This is not related to stack buffer overflows, and is not a security feature. zend.reserved_stack_size - is a new INI directive to set the reserved stack size, in bytes. This is - subtracted from the max allowed stack size, as a buffer, when checking the - stack size. + is a new INI directive to set the reserved stack size, in bytes. + This is subtracted from the max allowed stack size, + as a buffer, when checking the stack size. From ef2618ca4c8968775a36878d8181c1e299606aee Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Mon, 25 Sep 2023 20:33:55 +0900 Subject: [PATCH 23/25] fixed check-whitespace error --- appendices/migration83/other-changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index 9b8e6a89b5e4..9fbc09fe44e5 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -496,7 +496,7 @@ __toString(), __clone(), __sleep(), - __destruct(). + __destruct(). This is not related to stack buffer overflows, and is not a security feature. From f0e1c5ee483458a2e621ea41b8c0a1612c16e252 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Mon, 25 Sep 2023 21:18:00 +0900 Subject: [PATCH 24/25] added before/after example of range('9', 'A') --- appendices/migration83/incompatible.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 1d891aee1974..3bc7f12fa11d 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -186,8 +186,19 @@ range('5', '9', 0.5); does not produce a warning). range now produce a list of characters if one of the boundary inputs is a string digit instead of casting the other input - to int (e.g. range('5', 'z');). + to int (e.g. range('9', 'A');). + + + +", "?", "@", "A"], as of PHP 8.3.0 +range('9', 'A'); // [9, 8, 7, 6, 5, 4, 3, 2, 1, 0], prior to PHP 8.3.0 +?> +]]> + + From 48b58c1f5bc39c996836ab66a3ecd998223ba83e Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Tue, 26 Sep 2023 12:57:13 +0900 Subject: [PATCH 25/25] Apply suggestions from code review, part II. Co-authored-by: George Peter Banyard --- appendices/migration83/incompatible.xml | 2 +- appendices/migration83/other-changes.xml | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/appendices/migration83/incompatible.xml b/appendices/migration83/incompatible.xml index 3bc7f12fa11d..e884727971c0 100644 --- a/appendices/migration83/incompatible.xml +++ b/appendices/migration83/incompatible.xml @@ -117,7 +117,7 @@ with the same name, the declarations must be compatible. Otherwise, a typical compile error about incompatible declarations will be thrown. See the list of new features - and few functions for + and new functions for a list of the newly implemented methods and properties. diff --git a/appendices/migration83/other-changes.xml b/appendices/migration83/other-changes.xml index 9fbc09fe44e5..18c11e910b98 100644 --- a/appendices/migration83/other-changes.xml +++ b/appendices/migration83/other-changes.xml @@ -165,7 +165,7 @@ DOMDocument::loadHTML, DOMDocument::loadHTMLFile, - DOMDocument::loadXML and + DOMDocument::loadXML, and DOMDocument::loadXMLFile now have a tentative return type of bool. Previously, this was documented as having a return type of DOMDocument|bool, but, as of PHP 8.0.0, @@ -268,7 +268,7 @@ mysqli_poll now raises a ValueError - when the neither the read + when neither the read nor the error arguments are passed. @@ -371,7 +371,7 @@ password_hash will now chain the underlying Random\RandomException - as the ValueError’s $previous + as the ValueError's $previous Exception when salt generation fails. @@ -392,10 +392,12 @@ - number_format $decimal parameter handles rounding to - negative places. It means that when $decimals is negative, $num is rounded - to $decimals significant digits before the decimal - point. Previously negative $decimals got silently + The $decimal of number_format + now properly handles negative integers. + Rounding with a negative value for $decimal means + that $num is rounded to $decimals + significant digits before the decimal point. + Previously negative $decimals were silently ignored and the number got rounded to zero decimal places.