[DOC-CVS] [doc-en] master: Add PHP 8.5 migration guide (#4906)
[email protected] (Yoshinari Takaoka via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Yoshinari Takaoka (mumumu) Committer: GitHub (web-flow) Pusher: Girgias Date: 2025-11-10T03:08:19Z Commit: https://github.com/php/doc-en/commit/ec45af749649dc0d6a23eaedeed1b601f7460813 Raw diff: https://github.com/php/doc-en/commit/ec45af749649dc0d6a23eaedeed1b601f7460813.diff Add PHP 8.5 migration guide (#4906) Co-authored-by: Gina Peter Banyard <[email protected]> Changed paths: A appendices/migration85.xml A appendices/migration85/constants.xml A appendices/migration85/deprecated.xml A appendices/migration85/incompatible.xml A appendices/migration85/new-classes.xml A appendices/migration85/new-features.xml A appendices/migration85/new-functions.xml A appendices/migration85/other-changes.xml A appendices/migration85/windows-support.xml Diff: diff --git a/appendices/migration85.xml b/appendices/migration85.xml new file mode 100644 index 000000000000..99214921af2f --- /dev/null +++ b/appendices/migration85.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<appendix xml:id="migration85" xmlns="http://docbook.org/ns/docbook"> + <title>Migrating from PHP 8.4.x to PHP 8.5.x</title> + + <simpara> + This new minor version brings with it a number of + <link linkend="migration85.new-features">new features</link> and a + <link linkend="migration85.incompatible">few incompatibilities</link> + that should be tested for before switching PHP versions in production + environments. + </simpara> + + <simpara> + &manual.migration.seealso; + <link linkend="migration71">7.1.x</link>, + <link linkend="migration72">7.2.x</link>, + <link linkend="migration73">7.3.x</link>, + <link linkend="migration74">7.4.x</link>, + <link linkend="migration80">8.0.x</link>, + <link linkend="migration81">8.1.x</link>, + <link linkend="migration82">8.2.x</link>. + <link linkend="migration83">8.3.x</link>. + <link linkend="migration84">8.4.x</link>. + </simpara> + + &appendices.migration85.new-features; + &appendices.migration85.new-classes; + &appendices.migration85.new-functions; + &appendices.migration85.constants; + &appendices.migration85.incompatible; + &appendices.migration85.deprecated; + &appendices.migration85.other-changes; + &appendices.migration85.windows-support; + +</appendix> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/appendices/migration85/constants.xml b/appendices/migration85/constants.xml new file mode 100644 index 000000000000..0b8a86d31536 --- /dev/null +++ b/appendices/migration85/constants.xml @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="utf-8"?> +<sect1 xml:id="migration85.constants"> + <title>New Global Constants</title> + + <sect2 xml:id="migration85.constants.core"> + <title>Core</title> + + <simplelist> + <member> + <constant>PHP_BUILD_DATE</constant> + </member> + <member> + <constant>PHP_BUILD_PROVIDER</constant> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.constants.curl"> + <title>cURL</title> + + <simplelist> + <member> + <constant>CURLINFO_USED_PROXY</constant> + </member> + <member> + <constant>CURLINFO_HTTPAUTH_USED</constant> + </member> + <member> + <constant>CURLINFO_PROXYAUTH_USED</constant> + </member> + <member> + <constant>CURLINFO_CONN_ID</constant> + </member> + <member> + <constant>CURLINFO_QUEUE_TIME_T</constant> + </member> + <member> + <constant>CURLOPT_INFILESIZE_LARGE</constant> + </member> + <member> + <constant>CURLFOLLOW_ALL</constant> + </member> + <member> + <constant>CURLFOLLOW_OBEYCODE</constant> + </member> + <member> + <constant>CURLFOLLOW_FIRSTONLY</constant> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.constants.filter"> + <title>Filter</title> + + <simplelist> + <member> + <constant>FILTER_THROW_ON_FAILURE</constant> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.constants.intl"> + <title>Intl</title> + + <simplelist> + <member> + <constant>DECIMAL_COMPACT_SHORT</constant> + </member> + <member> + <constant>DECIMAL_COMPACT_LONG</constant> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.constants.openssl"> + <title>OpenSSL</title> + + <simplelist> + <member><constant>OPENSSL_PKCS1_PSS_PADDING</constant></member> + <member><constant>PKCS7_NOSMIMECAP</constant></member> + <member><constant>PKCS7_CRLFEOL</constant></member> + <member><constant>PKCS7_NOCRL</constant></member> + <member><constant>PKCS7_NO_DUAL_CONTENT</constant></member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.constants.posix"> + <title>POSIX</title> + + <simplelist> + <member><constant>POSIX_SC_OPEN_MAX</constant></member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.constants.sockets"> + <title>Sockets</title> + + <simplelist> + <member> + <constant>IPPROTO_ICMP</constant> + </member> + <member> + <constant>IPPROTO_ICMPV6</constant> + </member> + <member> + <constant>TCP_FUNCTION_BLK</constant> (FreeBSD only) + </member> + <member> + <constant>TCP_FUNCTION_ALIAS</constant> (FreeBSD only) + </member> + <member> + <constant>TCP_REUSPORT_LB_NUMA</constant> (FreeBSD only) + </member> + <member> + <constant>TCP_REUSPORT_LB_NUMA_NODOM</constant> (FreeBSD only) + </member> + <member> + <constant>TCP_REUSPORT_LB_NUMA_CURDOM</constant> (FreeBSD only) + </member> + <member> + <constant>TCP_BBR_ALGORITHM</constant> (FreeBSD only) + </member> + <member> + <constant>AF_PACKET</constant> (Linux only) + </member> + <member> + <constant>IP_BINDANY</constant> (FreeBSD/NetBSD/OpenBSD only) + </member> + <member> + <constant>SO_BUSY_POLL</constant> (Linux only) + </member> + <member> + <constant>UDP_SEGMENT</constant> (Linux only) + </member> + <member> + <constant>SHUT_RD</constant> + </member> + <member> + <constant>SHUT_WR</constant> + </member> + <member> + <constant>SHUT_RDWR</constant> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.constants.tokenizer"> + <title>Tokenizer</title> + <simplelist> + <member> + <constant>T_VOID_CAST</constant> + </member> + <member> + <constant>T_PIPE</constant> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.constants.standard"> + <title>Standard</title> + + <simplelist> + <member> + <constant>IMAGETYPE_SVG</constant> + when libxml is loaded. + </member> + </simplelist> + </sect2> + +</sect1> + <!-- Keep this comment at the end of the file + Local variables: + mode: sgml + sgml-omittag:t + sgml-shorttag:t + sgml-minimize-attributes:nil + sgml-always-quote-attributes:t + sgml-indent-step:1 + sgml-indent-data:t + indent-tabs-mode:nil + sgml-parent-document:nil + sgml-default-dtd-file:"~/.phpdoc/manual.ced" + sgml-exposed-tags:nil + sgml-local-catalogs:nil + sgml-local-ecat-files:nil + End: + vim600: syn=xml fen fdm=syntax fdl=2 si + vim: et tw=78 syn=sgml + vi: ts=1 sw=1 + --> diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml new file mode 100644 index 000000000000..ef39e1e9a8fa --- /dev/null +++ b/appendices/migration85/deprecated.xml @@ -0,0 +1,531 @@ +<?xml version="1.0" encoding="utf-8"?> +<sect1 xml:id="migration85.deprecated"> + <title>Deprecated Features</title> + + <sect2 xml:id="migration85.deprecated.core"> + <title>PHP Core</title> + + <sect3 xml:id="migration85.deprecated.core.changes-to-user-output-handler"> + <title>Changes to user output handler</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_4 --> + + <simpara> + Returning a non-string from a user output handler is deprecated. The + deprecation warning will bypass the handler with the bad return to ensure + it is visible; if there are nested output handlers the next one will still + be used. + </simpara> + + <simpara> + Trying to produce output (e.g. with <function>echo</function>) within + a user output handler is deprecated. + The deprecation warning will bypass the handler producing the output to + ensure it is visible; if there are nested output handlers the next + one will still be used. If a user output handler returns a non-string and + produces output, the warning about producing an output is emitted first. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.non-canonical-cast-names"> + <title>Non-canonical cast names</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_non-standard_cast_names --> + + <simpara> + Non-canonical cast names <literal>(boolean)</literal>, + <literal>(integer)</literal>, <literal>(double)</literal>, + and <literal>(binary)</literal> have been deprecated, + use <literal>(bool)</literal>, <literal>(int)</literal>, + <literal>(float)</literal>, and <literal>(string)</literal> respectively. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.case-statements-with-semicolon"> + <title>Terminating case statements with a semicolon</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_semicolon_after_case_in_switch_statement --> + + <simpara> + Terminating case statements with a semicolon instead of a colon has + been deprecated. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.the-backtick-operator"> + <title>The backtick operator</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_backticks_as_an_alias_for_shell_exec --> + + <simpara> + <link linkend="language.operators.execution">The backtick operator</link> + as an alias for <function>shell_exec</function> has been deprecated. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.return-null-from-debuginfo"> + <title>Returning null from __debugInfo()</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_debuginfo_returning_null --> + + <simpara> + Returning &null; from + <link linkend="language.oop5.magic.debuginfo">__debugInfo()</link> + has been deprecated. Return an empty array instead. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.return-memleaks-ini-directive"> + <title>report_memleaks INI directive</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_report_memleaks_ini_directive --> + + <simpara> + The <link linkend="ini.report-memleaks">report_memleaks</link> INI directive + has been deprecated. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.constant-redeclaration"> + <title>Constant redeclaration</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_constant_redeclaration --> + + <simpara> + Constant redeclaration has been deprecated. + Note that this already generated a warning and will continue to do so. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.closure-binding-issues"> + <title>Closure binding issues</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_closure_binding_issues --> + + <para> + The following closure binding issues, which already emit an + <constant>E_WARNING</constant>, are now deprecated: + + <simplelist> + <member>Binding an instance to a static closure.</member> + <member>Binding methods to objects that are not instances of the class + (or subclass) that the method is defined.</member> + <member>Unbinding $this from a method.</member> + <member>Unbinding $this from a closure that uses `$this`.</member> + <member>Binding a closure to the scope of an internal class.</member> + <member>Rebinding the scope of a closure created from a function or method.</member> + </simplelist> + </para> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.sleep-and-wakeup-magic-methods"> + <title>__sleep() and __wakeup() magic methods</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_sleep_and_wakeup_magic_methods --> + <!-- RFC: https://wiki.php.net/rfc/soft-deprecate-sleep-wakeup --> + + <simpara> + The <link linkend="object.sleep">__sleep()</link> and + <link linkend="object.wakeup">__wakeup()</link> magic methods + have been soft-deprecated. + The <link linkend="object.serialize">__serialize()</link> and + <link linkend="object.unserialize">__unserialize()</link> magic + methods should be used instead, or at the same time if compatibility + with PHP 7 is required. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.using-null-as-an-array-offset"> + <title>Using null as an array offset</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_using_values_null_as_an_array_offset_and_when_calling_array_key_exists --> + + <simpara> + Using &null; as an array offset or when calling <function>array_key_exists</function> + is now deprecated. Instead an empty string should be used. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.incrementing-non-numeric-strings"> + <title>Incrementing non-numeric strings</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#enact_follow-up_phase_of_the_path_to_saner_incrementdecrement_operators_rfc --> + + <simpara> + Incrementing non-numeric strings is now deprecated. + Instead the <function>str_increment</function> function should be used. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.deprecated.core.register-argc-argv-directive"> + <title>register_argc_argv INI directive</title> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_register_argc_argv_ini_directive --> + + <simpara> + Deriving <code>$_SERVER['argc']</code> and <code>$_SERVER['argv']</code> + from the query string for non-CLI SAPIs has been deprecated. + Configure <literal>register_argc_argv=0</literal> and switch to either + <varname>$_GET</varname> or <code>$_SERVER['QUERY_STRING']</code> + to access the information, after verifying that the usage is safe. + </simpara> + + </sect3> + + </sect2> + + <sect2 xml:id="migration85.deprecated.curl"> + <title>cURL</title> + + <simpara> + The <function>curl_close</function> function has been deprecated, + as <classname>CurlHandle</classname> objects are freed automatically. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_curl_close --> + </simpara> + + <simpara> + The <function>curl_share_close</function> function has been deprecated, + as <classname>CurlShareHandle</classname> objects are freed automatically. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_curl_share_close --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.date"> + <title>Date</title> + + <simpara> + The <constant>DATE_RFC7231</constant> and + <constant>DateTimeInterface::RFC7231</constant> constants have been deprecated. + This is because the associated timezone is ignored and always uses GMT. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_date_rfc7231_and_datetimeinterfacerfc7231 --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.fileinfo"> + <title>FileInfo</title> + + <simpara> + The <function>finfo_close</function> function has been deprecated. + As <classname>finfo</classname> objects are freed automatically. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_finfo_close --> + </simpara> + + <simpara> + The <parameter>$context</parameter> parameter of the + <function>finfo_buffer</function> function has been deprecated + as it is ignored. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_context_parameter_for_finfo_buffer --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.gd"> + <title>GD</title> + + <simpara> + The <function>imagedestroy</function> function has been deprecated, + as <classname>GdImage</classname> objects are freed automatically. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_imagedestroy --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.hash"> + <title>Hash</title> + + <simpara> + The <constant>MHASH_<replaceable>*</replaceable></constant> constants have + been deprecated. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.intl"> + <title>Intl</title> + + <simpara> + The <link linkend="ini.intl.error-level">intl.error_level</link> INI setting + has been deprecated. + Errors should either be checked manually or exceptions should be enabled by + using the <link linkend="ini.intl.use-exceptions">intl.use_exceptions</link> + INI setting. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_intlerror_level_ini_setting --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.ldap"> + <title>LDAP</title> + + <para> + Specific Oracle Instant Client calls and constants have been deprecated. + + List of affected calls: + <simplelist> + <member><function>ldap_connect</function> with wallet support</member> + <member><function>ldap_connect_wallet</function></member> + </simplelist> + + List of affected constants: + <simplelist> + <member><constant>GSLC_SSL_NO_UATH</constant></member> + <member><constant>GSLC_SSL_ONEWAY_UATH</constant></member> + <member><constant>GSLC_SSL_TWOWAY_UATH</constant></member> + </simplelist> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_building_ext_ldap_against_oracle_ldap --> + </para> + + </sect2> + + <sect2 xml:id="migration85.deprecated.mysqli"> + <title>MySQLi</title> + + <simpara> + The <function>mysqli_execute</function> alias function has been deprecated. + Use <function>mysqli_stmt_execute</function> instead. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_mysqli_execute --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.openssl"> + <title>OpenSSL</title> + + <simpara> + The <parameter>$key_length</parameter> parameter for + <function>openssl_pkey_derive</function> has been deprecated. + This is because it is either ignored, or truncates the key, which can be + a security vulnerability. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_key_length_parameter_of_openssl_pkey_derive --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.pdo"> + <title>PDO</title> + + <simpara> + The <literal>"uri:"</literal> DSN scheme has been deprecated due to security concerns with + DSNs coming from remote URIs. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_pdo_s_urischeme --> + </simpara> + + <para> + Driver specific constants in the PDO class have been deprecated. + List of affected constants and their replacement: + + <simplelist> + <member><constant>PDO::DBLIB_ATTR_CONNECTION_TIMEOUT</constant> => <constant>Pdo\Dblib::ATTR_CONNECTION_TIMEOUT</constant></member> + <member><constant>PDO::DBLIB_ATTR_QUERY_TIMEOUT</constant> => <constant>Pdo\Dblib::ATTR_QUERY_TIMEOUT</constant></member> + <member><constant>PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER</constant> => <constant>Pdo\Dblib::ATTR_STRINGIFY_UNIQUEIDENTIFIER</constant></member> + <member><constant>PDO::DBLIB_ATTR_VERSION</constant> => <constant>Pdo\Dblib::ATTR_VERSION</constant></member> + <member><constant>PDO::DBLIB_ATTR_TDS_VERSION</constant> => <constant>Pdo\Dblib::ATTR_TDS_VERSION</constant></member> + <member><constant>PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS</constant> => <constant>Pdo\Dblib::ATTR_SKIP_EMPTY_ROWSETS</constant></member> + <member><constant>PDO::DBLIB_ATTR_DATETIME_CONVERT</constant> => <constant>Pdo\Dblib::ATTR_DATETIME_CONVERT</constant></member> + <member><constant>PDO::FB_ATTR_DATE_FORMAT</constant> => <constant>Pdo\Firebird::ATTR_DATE_FORMAT</constant></member> + <member><constant>PDO::FB_ATTR_TIME_FORMAT</constant> => <constant>Pdo\Firebird::ATTR_TIME_FORMAT</constant></member> + <member><constant>PDO::FB_ATTR_TIMESTAMP_FORMAT</constant> => <constant>Pdo\Firebird::ATTR_TIMESTAMP_FORMAT</constant></member> + <member><constant>PDO::MYSQL_ATTR_USE_BUFFERED_QUERY</constant> => <constant>Pdo\Mysql::ATTR_USE_BUFFERED_QUERY</constant></member> + <member><constant>PDO::MYSQL_ATTR_LOCAL_INFILE</constant> => <constant>Pdo\Mysql::ATTR_LOCAL_INFILE</constant></member> + <member><constant>PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY</constant> => <constant>Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY</constant></member> + <member><constant>PDO::MYSQL_ATTR_INIT_COMMAND</constant> => <constant>Pdo\Mysql::ATTR_INIT_COMMAND</constant></member> + <member><constant>PDO::MYSQL_ATTR_MAX_BUFFER_SIZE</constant> => <constant>Pdo\Mysql::ATTR_MAX_BUFFER_SIZE</constant></member> + <member><constant>PDO::MYSQL_ATTR_READ_DEFAULT_FILE</constant> => <constant>Pdo\Mysql::ATTR_READ_DEFAULT_FILE</constant></member> + <member><constant>PDO::MYSQL_ATTR_READ_DEFAULT_GROUP</constant> => <constant>Pdo\Mysql::ATTR_READ_DEFAULT_GROUP</constant></member> + <member><constant>PDO::MYSQL_ATTR_COMPRESS</constant> => <constant>Pdo\Mysql::ATTR_COMPRESS</constant></member> + <member><constant>PDO::MYSQL_ATTR_DIRECT_QUERY</constant> => <constant>Pdo\Mysql::ATTR_DIRECT_QUERY</constant></member> + <member><constant>PDO::MYSQL_ATTR_FOUND_ROWS</constant> => <constant>Pdo\Mysql::ATTR_FOUND_ROWS</constant></member> + <member><constant>PDO::MYSQL_ATTR_IGNORE_SPACE</constant> => <constant>Pdo\Mysql::ATTR_IGNORE_SPACE</constant></member> + <member><constant>PDO::MYSQL_ATTR_SSL_KEY</constant> => <constant>Pdo\Mysql::ATTR_SSL_KEY</constant></member> + <member><constant>PDO::MYSQL_ATTR_SSL_CERT</constant> => <constant>Pdo\Mysql::ATTR_SSL_CERT</constant></member> + <member><constant>PDO::MYSQL_ATTR_SSL_CA</constant> => <constant>Pdo\Mysql::ATTR_SSL_CA</constant></member> + <member><constant>PDO::MYSQL_ATTR_SSL_CAPATH</constant> => <constant>Pdo\Mysql::ATTR_SSL_CAPATH</constant></member> + <member><constant>PDO::MYSQL_ATTR_SSL_CIPHER</constant> => <constant>Pdo\Mysql::ATTR_SSL_CIPHER</constant></member> + <member><constant>PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT</constant> => <constant>Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT</constant></member> + <member><constant>PDO::MYSQL_ATTR_SERVER_PUBLIC_KEY</constant> => <constant>Pdo\Mysql::ATTR_SERVER_PUBLIC_KEY</constant></member> + <member><constant>PDO::MYSQL_ATTR_MULTI_STATEMENTS</constant> => <constant>Pdo\Mysql::ATTR_MULTI_STATEMENTS</constant></member> + <member><constant>PDO::ODBC_ATTR_USE_CURSOR_LIBRARY</constant> => <constant>Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY</constant></member> + <member><constant>PDO::ODBC_ATTR_ASSUME_UTF8</constant> => <constant>Pdo\Odbc::ATTR_ASSUME_UTF8</constant></member> + <member><constant>PDO::ODBC_SQL_USE_IF_NEEDED</constant> => <constant>Pdo\Odbc::SQL_USE_IF_NEEDED</constant></member> + <member><constant>PDO::ODBC_SQL_USE_DRIVER</constant> => <constant>Pdo\Odbc::SQL_USE_DRIVER</constant></member> + <member><constant>PDO::ODBC_SQL_USE_ODBC</constant> => <constant>Pdo\Odbc::SQL_USE_ODBC</constant></member> + <member><constant>PDO::PGSQL_ATTR_DISABLE_PREPARES</constant> => <constant>Pdo\Pgsql::ATTR_DISABLE_PREPARES</constant></member> + <member><constant>PDO::SQLITE_ATTR_EXTENDED_RESULT_CODES</constant> => <constant>Pdo\Sqlite::ATTR_EXTENDED_RESULT_CODES</constant></member> + <member><constant>PDO::SQLITE_ATTR_OPEN_FLAGS</constant> => <constant>Pdo\Sqlite::OPEN_FLAGS</constant></member> + <member><constant>PDO::SQLITE_ATTR_READONLY_STATEMENT</constant> => <constant>Pdo\Sqlite::ATTR_READONLY_STATEMENT</constant></member> + <member><constant>PDO::SQLITE_DETERMINISTIC</constant> => <constant>Pdo\Sqlite::DETERMINISTIC</constant></member> + <member><constant>PDO::SQLITE_OPEN_READONLY</constant> => <constant>Pdo\Sqlite::OPEN_READONLY</constant></member> + <member><constant>PDO::SQLITE_OPEN_READWRITE</constant> => <constant>Pdo\Sqlite::OPEN_READWRITE</constant></member> + <member><constant>PDO::SQLITE_OPEN_CREATE</constant> => <constant>Pdo\Sqlite::OPEN_CREATE</constant></member> + </simplelist> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_building_ext_ldap_against_oracle_ldap --> + </para> + + <para> + Driver specific methods in the PDO class have been deprecated. + List of affected methods and their replacement: + + <simplelist> + <member><methodname>PDO::pgsqlCopyFromArray</methodname> => <methodname>Pdo\Pgsql::copyFromArray</methodname></member> + <member><methodname>PDO::pgsqlCopyFromFile</methodname> => <methodname>Pdo\Pgsql::copyFromFile</methodname></member> + <member><methodname>PDO::pgsqlCopyToArray</methodname> => <methodname>Pdo\Pgsql::copyToArray</methodname></member> + <member><methodname>PDO::pgsqlCopyToFile</methodname> => <methodname>Pdo\Pgsql::copyToFile</methodname></member> + <member><methodname>PDO::pgsqlGetNotify</methodname> => <methodname>Pdo\Pgsql::getNotify</methodname></member> + <member><methodname>PDO::pgsqlGetPid</methodname> => <methodname>Pdo\Pgsql::getPid</methodname></member> + <member><methodname>PDO::pgsqlLOBCreate</methodname> => <methodname>Pdo\Pgsql::lobCreate</methodname></member> + <member><methodname>PDO::pgsqlLOBOpen</methodname> => <methodname>Pdo\Pgsql::lobOpen</methodname></member> + <member><methodname>PDO::pgsqlLOBUnlink</methodname> => <methodname>Pdo\Pgsql::lobUnlink</methodname></member> + <member><methodname>PDO::sqliteCreateAggregate</methodname> => <methodname>Pdo\Sqlite::createAggregate</methodname></member> + <member><methodname>PDO::sqliteCreateCollation</methodname> => <methodname>Pdo\Sqlite::createCollation</methodname></member> + <member><methodname>PDO::sqliteCreateFunction</methodname> => <methodname>Pdo\Sqlite::createFunction</methodname></member> + </simplelist> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_driver_specific_pdo_constants_and_methods --> + </para> + + </sect2> + + <sect2 xml:id="migration85.deprecated.pdo-pgsql"> + <title>PDO_PGSQL</title> + + <para> + Constants related to transaction states have been deprecated as this feature is unavailable with PDO: + + <simplelist> + <member><constant>PDO::PGSQL_TRANSACTION_IDLE</constant></member> + <member><constant>PDO::PGSQL_TRANSACTION_ACTIVE</constant></member> + <member><constant>PDO::PGSQL_TRANSACTION_INTRANS</constant></member> + <member><constant>PDO::PGSQL_TRANSACTION_INERROR</constant></member> + <member><constant>PDO::PGSQL_TRANSACTION_UNKNOWN</constant></member> + </simplelist> + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#extpdo_deprecations --> + </para> + + </sect2> + + <sect2 xml:id="migration85.deprecated.reflection"> + <title>Reflection</title> + + <simpara> + The <code>setAccessible()</code> methods of various Reflection objects have been + deprecated, as those no longer have an effect. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionsetaccessible --> + </simpara> + + <simpara> + Calling <methodname>ReflectionClass::getConstant</methodname> for constants + that do not exist has been deprecated. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionclassgetconstant_for_missing_constants --> + </simpara> + + <simpara> + Calling <methodname>ReflectionProperty::getDefaultValue</methodname> for + properties without default values has been deprecated. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionpropertygetdefaultvalue_for_properties_without_default_values --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.spl"> + <title>SPL</title> + + <simpara> + Unregistering all autoloaders by passing the + <function>spl_autoload_call</function> function as a callback argument to + <function>spl_autoload_unregister</function> has been deprecated. + Instead if this is needed, one should iterate over the return value of + <function>spl_autoload_functions</function> and call + <function>spl_autoload_unregister</function> on each value. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_spl_autoload_call_to_spl_autoload_unregister --> + </simpara> + + <simpara> + The <methodname>SplObjectStorage::contains</methodname>, + <methodname>SplObjectStorage::attach</methodname>, and + <methodname>SplObjectStorage::detach</methodname> methods have been deprecated + in favour of <methodname>SplObjectStorage::offsetExists</methodname>, + <methodname>SplObjectStorage::offsetSet</methodname>, and + <methodname>SplObjectStorage::offsetUnset</methodname> respectively. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_splobjectstoragecontains_splobjectstorageattach_and_splobjectstoragedetach --> + </simpara> + + <simpara> + Using <classname>ArrayObject</classname> and + <classname>ArrayIterator</classname> with objects has been deprecated. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_arrayobject_and_arrayiterator_with_objects --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.standard"> + <title>Standard</title> + + <simpara> + The <function>socket_set_timeout</function> alias function has been deprecated. + Use <function>stream_set_timeout</function> instead. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_socket_set_timeout --> + </simpara> + + <simpara> + Passing &null; to <function>readdir</function>, + <function>rewinddir</function>, and <function>closedir</function> + to use the last opened directory has been deprecated. + Provide the last opened directory explicitly instead. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_null_to_readdir_rewinddir_and_closedir --> + </simpara> + + <simpara> + Passing integers outside the interval <literal>[0, 255]</literal> to <function>chr</function> + is now deprecated. + This is because a byte can only hold a value within this interval. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_integers_outside_the_interval_0_255_to_chr --> + </simpara> + + <simpara> + Passing a string which is not a single byte to <function>ord</function> + is now deprecated, this is indicative of a bug. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_string_which_are_not_one_byte_long_to_ord --> + </simpara> + + <simpara> + The locally predefined variable + <link linkend="reserved.variables.httpresponseheader">$http_response_header</link> + is deprecated. Instead one should call the + <function>http_get_last_response_headers</function> function. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.deprecated.xml"> + <title>XML</title> + + <simpara> + The <function>xml_parser_free</function> function has been deprecated, + as <classname>XMLParser</classname> objects are freed automatically. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_xml_parser_free --> + </simpara> + + </sect2> + +</sect1> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml new file mode 100644 index 000000000000..5fdf57cd5d62 --- /dev/null +++ b/appendices/migration85/incompatible.xml @@ -0,0 +1,587 @@ +<?xml version="1.0" encoding="utf-8"?> +<sect1 xml:id="migration85.incompatible" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>Backward Incompatible Changes</title> + + <sect2 xml:id="migration85.incompatible.core"> + <title>PHP Core</title> + + <sect3 xml:id="migration85.incompatible.core.array-callable-alias"> + <title><literal>"array"</literal> and <literal>"callable"</literal> alias name</title> + + <simpara> + It is no longer possible to use <literal>"array"</literal> + and <literal>"callable"</literal> as class alias names + in <function>class_alias</function> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.loosely-comparing-object"> + <title>Loosely comparing uncomparable objects</title> + + <simpara> + Loosely comparing uncomparable objects (e.g. enums, + <classname>CurlHandle</classname> and other internal classes) to booleans + was previously inconsistent. If compared to a boolean literal + <code>$object == true</code>, it would behave the same way as + <code>(bool)$object</code>. If compared to a statically unknown value + <code>$object == $true</code>, it would always return &false;. + This behavior was consolidated to always follow the behavior of + <code>(bool)$object</code>. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.gc-collect-cycles"> + <title>Return value of gc_collect_cycles</title> + + <simpara> + The return value of <function>gc_collect_cycles</function> no longer includes + strings and resources that were indirectly collected through cycles. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.substitute-final-subclasses"> + <title>Substitute static keyword in final subclass</title> + + <simpara> + It is now allowed to substitute <type>static</type> with <type>self</type> or the concrete class name + in final subclasses. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.tick-handlers"> + <title>Tick handlers</title> + + <simpara> + The tick handlers are now deactivated after all shutdown functions, + destructors have run and the output handlers have been cleaned up. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.trait-binding"> + <title>Traits binding</title> + + <simpara> + Traits are now bound before the parent class. This is a subtle behavioral + change, but should more closely match user expectations. + <!-- https://github.com/php/php-src/pull/15878 --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.errors-compilation-and-linking"> + <title>Errors during compilation and class linking</title> + + <simpara> + Errors emitted during compilation and class linking are now always delayed + and handled after compilation or class linking. Fatal errors emitted during + compilation or class linking cause any delayed errors to be handled + immediately, without calling user-defined error handlers. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.exception-by-userdefined-handler"> + <title>Exceptions thrown by user-defined error handler</title> + + <simpara> + Exceptions thrown by user-defined error handlers when handling class linking + errors are not promoted to fatal errors anymore and do not prevent linking. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.attribute-during-compilation"> + <title>Attribute apply error during compilation</title> + + <simpara> + Applying <code>#[\Attribute]</code> to an abstract class, enum, interface, or trait + triggers an error during compilation. Previously, the attribute could be + added, but when <methodname>ReflectionAttribute::newInstance</methodname> + was called an error would be thrown. + The error can be delayed from compilation to runtime using the new + <code>#[\DelayedTargetValidation]</code> attribute. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.disable-ini-setting"> + <title>disable_classes INI setting</title> + + <simpara> + The <link linkend="ini.disable-classes">disable_classes</link> INI setting + has been removed as it causes various engine assumptions to be broken. + <!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#remove_disable_classes_ini_setting --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.destruct-non-array-values"> + <title>Destructing non-array values</title> + + <simpara> + Destructing non-array values (other than &null;) using <literal>[]</literal> or <function>list</function> now + emits a warning. + <!-- RFC: https://wiki.php.net/rfc/warnings-php-8-5#destructuring_non-array_values --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.incompatible.core.warning-related-to-cast"> + <title>Warnings related to cast</title> + + <simpara> + A warning is now emitted when casting floats (or strings that look like + floats) to int if they cannot be represented as one. This affects explicit + int casts and implicit int casts. + <!-- RFC: https://wiki.php.net/rfc/warnings-php-8-5#casting_out_of_range_floats_to_int --> + </simpara> + + <simpara> + A warning is now emitted when casting NAN to other types. + <!-- RFC: https://wiki.php.net/rfc/warnings-php-8-5#coercing_nan_to_other_types --> + </simpara> + + </sect3> + + </sect2> + + <sect2 xml:id="migration85.incompatible.bzip2"> + <title>Bzip2</title> + + <simpara> + <function>bzcompress</function> now throws a <classname>ValueError</classname> + when <parameter>$block_size</parameter> is not between 1 and 9. + </simpara> + + <simpara> + <function>bzcompress</function> now throws a <classname>ValueError</classname> + when <parameter>$work_factor</parameter> is not between 0 and 250. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.dom"> + <title>DOM</title> + + <simpara> + Cloning a <classname>DOMNamedNodeMap</classname>, + <classname>DOMNodeList</classname>, <classname>Dom\NamedNodeMap</classname>, + <classname>Dom\NodeList</classname>, <classname>Dom\HTMLCollection</classname>, + and <classname>Dom\DtdNamedNodeMap</classname> now fails. + This never actually resulted in a working object, therefore no impact is expected. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.fileinfo"> + <title>FileInfo</title> + + <simpara> + <function>finfo_file</function> and <methodname>finfo::file</methodname> + now throws a <exceptionname>ValueError</exceptionname> instead of a + <exceptionname>TypeError</exceptionname> when <parameter>$filename</parameter> + contains nul bytes. + This aligns the type of Error thrown to be consistent with the rest of + the language. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.intl"> + <title>Intl</title> + + <simpara> + The extension now requires at least ICU 57.1. + </simpara> + + <simpara> + <methodname>IntlDateFormatter::setTimeZone</methodname>/<function>datefmt_set_timezone</function> + now throws an <exceptionname>IntlException</exceptionname> on uninitialised + classes/clone failures. + </simpara> + + <simpara> + All <classname>Locale</classname> methods now throw a + <exceptionname>ValueError</exceptionname> when the locale argument contain null bytes. + </simpara> + + <simpara> + The behaviour of <constant>Collator::SORT_REGULAR</constant> with respect to + handling numeric strings is now aligned with the behaviour of + <constant>SORT_REGULAR</constant> in ext/standard. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.ldap"> + <title>LDAP</title> + + <simpara> + <function>ldap_get_option</function> and <function>ldap_set_option</function> + now throw a <exceptionname>ValueError</exceptionname> when passing an invalid option. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.mbstring"> + <title>MBString</title> + + <simpara> + Unicode data tables have been updated to Unicode 17.0 + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.mysqli"> + <title>MySQLi</title> + + <simpara> + Calling the mysqli constructor on an already-constructed object + is now no longer possible and throws an <exceptionname>Error</exceptionname>. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.odbc"> + <title>ODBC</title> + + <simpara> + ODBC now assumes that at least ODBC 3.5 functionality is available. + The ODBCVER definition and build system flags to control it have been removed. + </simpara> + + <simpara> + ODBC no longer has build flags to build against specific drivers (except + for DB2) and removes special cases for those drivers. It is strongly + recommended to use a driver manager like iODBC or unixODBC on non-Windows. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.opcache"> + <title>Opcache</title> + + <simpara> + The Opcache extension is now always built into the PHP binary and is always + loaded. + The INI directives <link linkend="ini.opcache.enable">opcache.enable</link> + and <link linkend="ini.opcache.enable-cli">opcache.enable_cli</link> are still + honored. + </simpara> + + <simpara> + The <option role="configure">--enable-opcache</option>/<option role="configure">--disable-opcache</option> + configure flags have been removed, and the build does not produce <filename>opcache.so</filename> + or <filename>php_opcache.dll</filename> objects anymore. + </simpara> + + <simpara> + Using <literal>zend_extension=opcache.so</literal> or + <literal>zend_extension=php_opcache.dll</literal> INI directives + will emit a warning. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.pcntl"> + <title>PCNTL</title> + + <simpara> + <function>pcntl_exec</function> now throws <exceptionname>ValueError</exceptionname> + when entries of the <parameter>$args</parameter> parameter contain null bytes. + </simpara> + + <simpara> + <function>pcntl_exec</function> now throws <exceptionname>ValueError</exceptionname> + when entries or keys of the <parameter>$env_vars</parameter> parameter + contain null bytes. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.pcre"> + <title>PCRE</title> + + <simpara> + The extension is compiled without semi-deprecated + PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK compile option. + <!-- https://github.com/PCRE2Project/pcre2/issues/736#issuecomment-2754024651 --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.pdo"> + <title>PDO</title> + + <simpara> + The constructor arguments set in conjunction with + <constant>PDO::FETCH_CLASS</constant> now follow the usual CUFA + (<function>call_user_func_array</function>) semantics. + This means string keys will act like a named argument. + Moreover, automatic wrapping for by-value arguments passed to a by-ref + parameter has been removed, and the usual <constant>E_WARNING</constant> + about this is now emitted. + To pass a variable by-ref to a constructor argument use the general + array value reference assignment: <code>$ctor_args = [&$valByRef]</code> + </simpara> + + <simpara> + Attempting to call <methodname>PDOStatement::setFetchMode</methodname> during + a call to <methodname>PDO::fetch</methodname>, + <methodname>PDO::fetchObject</methodname>, + <methodname>PDO::fetchAll</methodname>, for example using tricks such as + passing the statement object as a constructor argument when fetching into an + object, will now throw an <exceptionname>Error</exceptionname>. + </simpara> + + <simpara> + The value of the constants <constant>PDO::FETCH_GROUP</constant>, + <constant>PDO::FETCH_UNIQUE</constant>, + <constant>PDO::FETCH_CLASSTYPE</constant>, + <constant>PDO::FETCH_PROPS_LATE</constant>, and + <constant>PDO::FETCH_SERIALIZE</constant> have changed. + </simpara> + + <simpara> + A <exceptionname>ValueError</exceptionname> is now thrown if + <constant>PDO::FETCH_PROPS_LATE</constant> is used with a fetch mode + different than <constant>PDO::FETCH_CLASS</constant>, consistent with + other fetch flags. + </simpara> + + <simpara> + A <exceptionname>ValueError</exceptionname> is now thrown if + <constant>PDO::FETCH_INTO</constant> is used as a fetch mode in + <methodname>PDO::fetchAll</methodname>, + similar to <constant>PDO::FETCH_LAZY</constant>. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.pdo-firebird"> + <title>PDO_FIREBIRD</title> + + <simpara> + A <exceptionname>ValueError</exceptionname> is now thrown when trying to set a cursor + name that is too long on a <classname>PDOStatement</classname> resulting from + the Firebird driver. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.pdo-sqlite"> + <title>PDO_SQLITE</title> + + <simpara> + SQLite <methodname>PDO::quote</methodname> will now throw an exception + or emit a warning, depending on the error mode, if the string contains + a null byte. + </simpara> + + <simpara> + <methodname>PDO::sqliteCreateCollation</methodname> will now throw an + exception if the callback has the wrong return type, making it more + in line with <methodname>Pdo\Sqlite::createCollation</methodname> behavior. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.posix"> + <title>POSIX</title> + + <simpara> + <function>posix_kill</function> now throws a + <exceptionname>ValueError</exceptionname> when the process_id argument is + lower or greater than what the platform supports (signed integer or + long range), <function>posix_setpgid</function> now throws a + <exceptionname>ValueError</exceptionname> when the process_id or + the process_group_id is lower than zero or greater than what the platform + supports. + </simpara> + + <simpara> + <function>posix_setrlimit</function> now throws a + <exceptionname>ValueError</exceptionname> when the hard_limit or + soft_limit arguments are lower than -1 or if soft_limit is greater than + hard_limit. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.reflection"> + <title>Reflection</title> + + <simpara> + <methodname>ReflectionAttribute::newInstance</methodname> can now throw + errors for internal attributes if the attribute was applied on an invalid + target and the error was delayed from compile time to runtime via the + #[\DelayedTargetValidation] attribute. + <!-- RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.session"> + <title>Session</title> + + <simpara> + Attempting to write session data where <varname>$_SESSION</varname> has a key + containing the pipe character (<literal>|</literal>) will now emit a warning + instead of silently failing. + </simpara> + + <simpara> + <function>session_start</function> is stricter in regard to the options + argument. It now throws a <exceptionname>ValueError</exceptionname> if + the array is not a hashmap, or a <exceptionname>TypeError</exceptionname> + if the read_and_close value is not a valid type compatible with int. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.simplexml"> + <title>SimpleXML</title> + + <simpara> + Passing an XPath expression that returns something other than a node set + to <methodname>SimpleXMLElement::xpath</methodname> will now emit a warning + and return &false;, instead of silently failing and returning an empty array. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.snmp"> + <title>SNMP</title> + + <simpara> + <function>snmpget</function>, + <function>snmpset</function>, + <function>snmp2_get</function>, + <function>snmp2_set</function>, + <function>snmp3_get</function>, + <function>snmp3_set</function> + and <methodname>SNMP::__construct</methodname> now throw a + <exceptionname>ValueError</exceptionname> when the hostname + is too large, contains any null byte or if the port is given + when negative or greater than 65535, timeout and retries values + are lower than -1 or too large. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.soap"> + <title>SOAP</title> + + <simpara> + <methodname>SoapClient::__doRequest</methodname> now accepts a new, + optional <parameter>$uriParserClass</parameter> parameter accepting + string or &null; arguments. + &null; represents the original (<function>parse_url</function>) based + method, while the new backends will be used when passing either + <classname>Uri\Rfc3986\Uri</classname> or <classname>Uri\WhatWg\Url</classname>. + <!-- RFC: https://wiki.php.net/rfc/url_parsing_api#plugability --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.sockets"> + <title>Sockets</title> + + <simpara> + <function>socket_create_listen</function>, + <function>socket_bind</function> and <function>socket_sendto</function> + now throw a <exceptionname>ValueError</exceptionname> if the port is lower + than 0 or greater than 65535, and also if any of the hints array entries are + indexed numerically. + </simpara> + + <simpara> + <function>socket_addrinfo_lookup</function> now throws a + <exceptionname>TypeError</exceptionname> if any of the hints values cannot + be cast to int and can throw a <exceptionname>ValueError</exceptionname> if + any of these values overflow. + </simpara> + + <simpara> + <function>socket_set_option</function> with + <constant>MCAST_LEAVE_GROUP</constant>/<constant>MCAST_LEAVE_SOURCE_GROUP</constant> + options now throw an exception if the value isn't a valid object or array. + </simpara> + + <simpara> + <function>socket_set_option</function> with multicast context now throws a + <exceptionname>ValueError</exceptionname> when the created socket is not of + <constant>AF_INET</constant>/<constant>AF_INET6</constant> family. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.spl"> + <title>SPL</title> + + <simpara> + <classname>ArrayObject</classname> no longer accepts enums, as modifying the + <property>$name</property> or <property>$value</property> properties can break + engine assumptions. + </simpara> + + <simpara> + <methodname>SplFileObject::fwrite</methodname>'s parameter + <parameter>$length</parameter> is now nullable. + The default value changed from <literal>0</literal> to &null;. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.standard"> + <title>Standard</title> + + <simpara> + Using a printf-family function with a formatter that did not specify the + precision previously incorrectly reset the precision instead of treating + it as a precision of 0. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.incompatible.tidy"> + <title>Tidy</title> + + <simpara> + <methodname>tidy::__construct</methodname>, + <methodname>tidy::parseFile</methodname>, + <methodname>tidy::parseString</methodname> now throws a + <exceptionname>ValueError</exceptionname> if the configuration contains an + invalid value or attempts to set a read-only internal entry, + and a <exceptionname>TypeError</exceptionname> if a configuration key is not a + string. + </simpara> + + </sect2> + +</sect1> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/appendices/migration85/new-classes.xml b/appendices/migration85/new-classes.xml new file mode 100644 index 000000000000..d47bed152f20 --- /dev/null +++ b/appendices/migration85/new-classes.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<sect1 xml:id="migration85.new-classes" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>New Classes and Interfaces</title> + + <sect2 xml:id="migration85.new-classes.core"> + <title>Core</title> + <simplelist> + <member><classname>NoDiscard</classname></member> + <member><classname>DelayedTargetValidation</classname></member> + </simplelist> + <!-- RFC: https://wiki.php.net/rfc/marking_return_value_as_important --> + <!-- RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute --> + </sect2> + + <sect2 xml:id="migration85.new-classes.curl"> + <title>Curl</title> + <simplelist> + <member><classname>CurlSharePersistentHandle</classname></member> + </simplelist> + <!-- RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement --> + </sect2> + + <sect2 xml:id="migration85.new-classes.filter"> + <title>Filter</title> + <simplelist> + <member><classname>Filter\FilterException</classname></member> + <member><classname>Filter\FilterFailedException</classname></member> + </simplelist> + <!-- RFC: https://wiki.php.net/rfc/filter_throw_on_failure --> + </sect2> + + <sect2 xml:id="migration85.new-classes.uri"> + <title>URI</title> + <simplelist> + <member><classname>Uri\UriException</classname></member> + <member><classname>Uri\InvalidUriException</classname></member> + <member><classname>Uri\UriComparisonMode</classname></member> + <member><classname>Uri\Rfc3986\Uri</classname></member> + <member><classname>Uri\WhatWg\InvalidUrlException</classname></member> + <member><classname>Uri\WhatWg\UrlValidationErrorType</classname></member> + <member><classname>Uri\WhatWg\UrlValidationError</classname></member> + <member><classname>Uri\WhatWg\Url</classname></member> + </simplelist> + <!-- RFC: https://wiki.php.net/rfc/url_parsing_api --> + </sect2> + +</sect1> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml new file mode 100644 index 000000000000..5f2424d70af2 --- /dev/null +++ b/appendices/migration85/new-features.xml @@ -0,0 +1,497 @@ +<?xml version="1.0" encoding="utf-8"?> +<sect1 xml:id="migration85.new-features" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>New Features</title> + + <sect2 xml:id="migration85.new-features.core"> + <title>PHP Core</title> + + <sect3 xml:id="migration85.new-features.core.pipe-operator"> + <title>Pipe Operator</title> + + <simpara> + Added the <link linkend="language.operators.functional">pipe + (<literal>|></literal>) operator</link>. + <!-- RFC: https://wiki.php.net/rfc/pipe-operator-v3 --> + </simpara> + + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +$result = "Hello World" |> strlen(...); +print $result . PHP_EOL; // Prints "11" +]]> + </programlisting> + </informalexample> + </sect3> + + <sect3 xml:id="migration85.new-features.core.closures-in-constexpr"> + <title>Closure in constant expressions</title> + + <para> + Added support for <link linkend="class.closure">Closures</link> and + <link linkend="functions.first_class_callable_syntax">first class callables</link> + in constant expressions. This includes: + + <simplelist> + <member>Attribute parameters.</member> + <member>Default values of properties and parameters.</member> + <member>Constants and Class Constants.</member> + </simplelist> + + <!-- RFC: https://wiki.php.net/rfc/closures_in_const_expr --> + <!-- RFC: https://wiki.php.net/rfc/fcc_in_const_expr --> + </para> + </sect3> + + <sect3 xml:id="migration85.new-features.core.nodiscard-attribute"> + <title>#[\NoDiscard] attribute</title> + + <simpara> + Added the <classname>NoDiscard</classname> attribute to indicate that a + function's return value is important and should be consumed. + <!-- RFC: https://wiki.php.net/rfc/marking_return_value_as_important --> + </simpara> + + <simpara> + Also, added the <literal>(void)</literal> cast to indicate that not using a value is intentional. + The <literal>(void)</literal> cast has no effect on the program's execution by itself, but + it can be used to suppress warnings emitted by <code>#[\NoDiscard]</code> and possibly + also diagnostics emitted by external IDEs or static analysis tools. + <!-- RFC: https://wiki.php.net/rfc/marking_return_value_as_important --> + </simpara> + + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +#[\NoDiscard] +function concat(string $a, string $b): string { + return a + b; +} + +// Warning: The return value of function concat() should either be used or +// intentionally ignored by casting it as (void) in xxx.php +concat("a", "b"); + +// No warning, because the return value is consumed by the assignment. +$results = concat("a", "b"); + +// No warning, because the (void) cast is used. +(void)concat("a", "b"); +]]> + </programlisting> + </informalexample> + + </sect3> + + <sect3 xml:id="migration85.new-features.core.attributes-on-constants"> + <title>Attributes on Constants</title> + + <simpara> + Added support for attributes on compile-time non-class constants + (e.g. <code>const MY_CONST = 1;</code> rather than + <code>define('MY_CONST', 1);</code>). + <!-- RFC: https://wiki.php.net/rfc/attributes-on-constants --> + </simpara> + + <simpara> + The <classname>Deprecated</classname> attribute can now be used on constants. + <!-- RFC: https://wiki.php.net/rfc/attributes-on-constants --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.new-features.core.delayedtargetvalidation-attribute"> + <title><code>#[\DelayedTargetValidation]</code> attribute</title> + + <simpara> + The new <classname>DelayedTargetValidation</classname> attribute can be used + to suppress compile-time errors from core (or extension) attributes that are + used on invalid targets. These errors are instead reported at runtime if and + when <methodname>ReflectionAttribute::newInstance</methodname> is called. + <!-- RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.new-features.core.override-for-properties"> + <title><code>#[\Override]</code> for properties</title> + + <simpara> + <classname>Override</classname> attribute can now be applied to properties. + <!-- RFC: https://wiki.php.net/rfc/override_properties --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.new-features.core.static-aviz"> + <title>Static Asymmetric Visibility</title> + + <simpara> + Added <link linkend="language.oop5.visibility-members-aviz">asymmetric + visibility</link> support for static properties. + <!-- RFC: https://wiki.php.net/rfc/static-aviz --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.new-features.core.backtraces-for-fatal-errors"> + <title>Backtraces for Fatal Errors</title> + + <simpara> + Fatal Errors (such as an exceeded maximum execution time) now include a + backtrace. + <!-- RFC: https://wiki.php.net/rfc/error_backtraces_v2 --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.new-features.core.final-property-promotion"> + <title>Constructor promotion for final property</title> + + <simpara> + <link linkend="language.oop5.decon.constructor.promotion">Constructor + property promotion</link> can now be used for final properties. + <!-- RFC: https://wiki.php.net/rfc/final_promotion --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.new-features.core.casts-in-constexpr"> + <title>Casts in constant expressions</title> + + <simpara> + Added support for casts in constant expressions. + </simpara> + + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +const T1 = (int) 0.3; // Previously: "Fatal error: Constant expression contains invalid operations" +print T1 . PHP_EOL; // Prints "0" +]]> + </programlisting> + </informalexample> + + </sect3> + + <sect3 xml:id="migration85.new-features.core.clone-function"> + <title>Clone function</title> + + <simpara> + The <link linkend="language.oop5.cloning">clone language construct</link> + is now a function and supports reassigning (readonly) properties during + cloning via the new <property>$withProperties</property> parameter. + <!-- RFC: https://wiki.php.net/rfc/clone_with_v2 --> + </simpara> + + </sect3> + + </sect2> + + <sect2 xml:id="migration85.new-features.curl"> + <title>cURL</title> + + <simpara> + Added support for + <link linkend="class.curlsharepersistenthandle">share handles</link> + that are persisted across multiple PHP requests, safely allowing for + more effective connection reuse. + <!-- RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement --> + </simpara> + + <simpara> + Added support for <constant>CURLINFO_USED_PROXY</constant> (libcurl >= 8.7.0), + <constant>CURLINFO_HTTPAUTH_USED</constant>, + and <constant>CURLINFO_PROXYAUTH_USED</constant> (libcurl >= 8.12.0) + to the <function>curl_getinfo</function> function. + When <function>curl_getinfo</function> returns an array, the same information + is available as <literal>"used_proxy"</literal>, + <literal>"httpauth_used"</literal>, and <literal>"proxyauth_used"</literal> + keys. + <constant>CURLINFO_USED_PROXY</constant> gets zero set if no proxy was used in the + previous transfer or a non-zero value if a proxy was used. + <constant>CURLINFO_HTTPAUTH_USED</constant> and + <constant>CURLINFO_PROXYAUTH_USED</constant> get bitmasks + indicating the HTTP and proxy authentication methods that were + used in the previous request. + See <constant>CURLAUTH_<replaceable>*</replaceable></constant> constants for + possible values. + </simpara> + + <simpara> + Added <constant>CURLOPT_INFILESIZE_LARGE</constant> Curl option, which is a safe + replacement for <constant>CURLOPT_INFILESIZE</constant>. On certain systems, + <constant>CURLOPT_INFILESIZE</constant> only accepts a 32-bit signed integer as + the file size (2.0 GiB) even on 64-bit systems. + <constant>CURLOPT_INFILESIZE_LARGE</constant> accepts the largest integer value + the system can handle. + </simpara> + + <simpara> + Added <constant>CURLFOLLOW_OBEYCODE</constant>, + <constant>CURLFOLLOW_FIRSTONLY</constant> and <constant>CURLFOLLOW_ALL</constant> + values for <constant>CURLOPT_FOLLOWLOCATION</constant> + <function>curl_setopt</function> option. + <constant>CURLFOLLOW_OBEYCODE</constant> to follow more strictly in regard to + redirect if they are allowed. + <constant>CURLFOLLOW_FIRSTONLY</constant> to follow only the first redirect thus + if there is any follow up redirect, it won't go any further. + <constant>CURLFOLLOW_ALL</constant> is equivalent to setting + <constant>CURLOPT_FOLLOWLOCATION</constant> to true. + </simpara> + + <simpara> + Added support for <constant>CURLINFO_CONN_ID</constant> (libcurl >= 8.2.0) + to the <function>curl_getinfo</function> function. This constant allows retrieving + the unique ID of the connection used by a cURL transfer. It is primarily + useful when connection reuse or connection pooling logic is needed in + PHP-level applications. When <function>curl_getinfo</function> returns an array, + this value is available as the <literal>"conn_id"</literal> key. + </simpara> + + <simpara> + Added support for <constant>CURLINFO_QUEUE_TIME_T</constant> (libcurl >= 8.6.0) + to the <function>curl_getinfo</function> function. This constant allows + retrieving the time (in microseconds) that the request spent in libcurl’s + connection queue before it was sent. + This value can also be retrieved by passing + <constant>CURLINFO_QUEUE_TIME_T</constant> to the <function>curl_getinfo</function> + <parameter>option</parameter> parameter. + </simpara> + + <simpara> + Added support for <constant>CURLOPT_SSL_SIGNATURE_ALGORITHMS</constant> to + specify the signature algorithms to use for TLS. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.dom"> + <title>DOM</title> + + <simpara> + Added <property>Dom\Element::$outerHTML</property>. + </simpara> + + <simpara> + Added <property>$children</property> property to + <interfacename>Dom\ParentNode</interfacename> implementations. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.exif"> + <title>EXIF</title> + + <simpara> + Added support for <literal>OffsetTime*</literal> Exif tags. + </simpara> + + <simpara> + Added support for HEIF/HEIC. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.filter"> + <title>Filter</title> + + <simpara> + Added new <constant>FILTER_THROW_ON_FAILURE</constant> flag which can be + passed to the filter functions and will force an exception to be triggered + when validation fails. + The new flag cannot be combined with + <constant>FILTER_NULL_ON_FAILURE</constant>; trying to do so will result + in a <exceptionname>ValueError</exceptionname> being thrown. + <!-- RFC: https://wiki.php.net/rfc/filter_throw_on_failure --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.intl"> + <title>Intl</title> + + <simpara> + Added class constants <constant>NumberFormatter::CURRENCY_ISO</constant>, + <constant>NumberFormatter::CURRENCY_PLURAL</constant>, + <constant>NumberFormatter::CASH_CURRENCY</constant>, + and <constant>NumberFormatter::CURRENCY_STANDARD</constant> + for various currency-related number formats. + </simpara> + + <simpara> + Added <methodname>Locale::addLikelySubtags</methodname> and + <methodname>Locale::minimizeSubtags</methodname> to handle likely tags + on a given locale. + </simpara> + + <simpara> + Added <classname>IntlListFormatter</classname> class to format, order, + and punctuate a list of items with a given locale, + <constant>IntlListFormatter::TYPE_AND</constant>, + <constant>IntlListFormatter::TYPE_OR</constant>, + <constant>IntlListFormatter::TYPE_UNITS</constant> operands and + <constant>IntlListFormatter::WIDTH_WIDE</constant>, + <constant>IntlListFormatter::WIDTH_SHORT</constant> and + <constant>IntlListFormatter::WIDTH_NARROW</constant> widths. + It is supported from icu 67. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.pdo-sqlite"> + <title>PDO_Sqlite</title> + + <simpara> + Added class constant <constant>Pdo\Sqlite::ATTR_BUSY_STATEMENT</constant>. + </simpara> + + <simpara> + Added class constants <constant>Pdo\Sqlite::ATTR_EXPLAIN_STATEMENT</constant>, + <constant>Pdo\Sqlite::EXPLAIN_MODE_PREPARED</constant>, + <constant>Pdo\Sqlite::EXPLAIN_MODE_EXPLAIN</constant>, + <constant>Pdo\Sqlite::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN</constant>. + </simpara> + + <simpara> + Added <constant>Pdo\Sqlite::ATTR_TRANSACTION_MODE</constant> connection attribute + with possible values <constant>Pdo\Sqlite::TRANSACTION_MODE_DEFERRED</constant>, + <constant>Pdo\Sqlite::TRANSACTION_MODE_IMMEDIATE</constant>, + and <constant>Pdo\Sqlite::TRANSACTION_MODE_EXCLUSIVE</constant>, + allowing to configure the transaction mode to use when calling beginTransaction(). + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.session"> + <title>Session</title> + + <simpara> + <function>session_set_cookie_params</function>, + <function>session_get_cookie_params</function>, + and <function>session_start</function> now support partitioned cookies via the + <literal>"partitioned"</literal> key. + <!-- RFC: https://wiki.php.net/rfc/CHIPS --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.soap"> + <title>SOAP</title> + + <simpara> + Enumeration cases are now dumped in <methodname>SoapClient::__getTypes</methodname>. + </simpara> + + <simpara> + Added support for Soap 1.2 Reason Text xml:lang attribute. + </simpara> + + <simpara> + The signature of <methodname>SoapFault::__construct</methodname> and + <methodname>SoapServer::fault</methodname> therefore + now have an optional <parameter>$lang</parameter> parameter. + This support solves compatibility with .NET SOAP clients. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.standard"> + <title>Standard</title> + + <simpara> + <function>mail</function> now returns the actual sendmail error and detects + if the sendmail process was terminated unexpectedly. + In such cases, a warning is emitted and the function returns false. + Previously, these errors were silently ignored. + This change affects only the sendmail transport. + </simpara> + + <simpara> + <function>getimagesize</function> now supports HEIF/HEIC images. + </simpara> + + <simpara> + <function>getimagesize</function> now supports SVG images when ext-libxml + is also loaded. + Similarly, <function>image_type_to_extension</function> and + <function>image_type_to_mime_type</function> + now also handle IMAGETYPE_SVG. + </simpara> + + <simpara> + The array returned by <function>getimagesize</function> now has two additional entries: + <literal>"width_unit"</literal> and <literal>"height_unit"</literal> to indicate in + which units the dimensions are expressed. These units are px by default. They are not + necessarily the same (just to give one example: one may be cm and the other may be px). + </simpara> + + <simpara> + <function>setcookie</function> and <function>setrawcookie</function> now support the + <literal>"partitioned"</literal> key. + <!-- RFC: https://wiki.php.net/rfc/CHIPS --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.uri"> + <title>URI</title> + + <simpara> + An always enabled uri extension is added that can be used for handling + URIs and URLs according to RFC 3986 and WHATWG URL. + <!-- RFC: https://wiki.php.net/rfc/url_parsing_api --> + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.xsl"> + <title>XSL</title> + + <simpara> + The <parameter>$namespace</parameter> argument of <methodname>XSLTProcessor::getParameter</methodname>, + <methodname>XSLTProcessor::setParameter</methodname> and + <methodname>XSLTProcessor::removeParameter</methodname> now actually works + instead of being treated as empty. + This only works if the <parameter>$name</parameter> argument does not use Clark notation and is not a + QName because in those cases the namespace is taken from the namespace href or + prefix respectively. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.new-features.zlib"> + <title>Zlib</title> + + <simpara> + <function>flock</function> is now supported on zlib streams. Previously, + this always failed to perform any locking action. + </simpara> + + </sect2> + +</sect1> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/appendices/migration85/new-functions.xml b/appendices/migration85/new-functions.xml new file mode 100644 index 000000000000..fe768ee9e653 --- /dev/null +++ b/appendices/migration85/new-functions.xml @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="utf-8"?> +<sect1 xml:id="migration85.new-functions"> + <title>New Functions</title> + + <sect2 xml:id="migration85.new-functions.core"> + <title>Core</title> + + <simplelist> + <!-- RFC: https://wiki.php.net/rfc/get-error-exception-handler --> + <!-- RFC: https://wiki.php.net/rfc/get-error-exception-handler --> + <member><function>get_error_handler</function></member> + <member><function>get_exception_handler</function></member> + <member> + <methodname>Closure::getCurrent</methodname> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.curl"> + <title>Curl</title> + + <simplelist> + <!-- RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement --> + <member><function>curl_multi_get_handles</function></member> + <member><function>curl_share_init_persistent</function></member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.dom"> + <title>DOM</title> + <simplelist> + <member> + <methodname>Dom\Element::getElementsByClassName</methodname> + </member> + <member> + <methodname>Dom\Element::insertAdjacentHTML</methodname> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.enchant"> + <title>Enchant</title> + <simplelist> + <member><function>enchant_dict_remove_from_session</function></member> + <member><function>enchant_dict_remove</function></member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.intl"> + <title>Intl</title> + <simplelist> + <member> + <methodname>Locale::isRightToLeft</methodname> + </member> + <member><function>locale_is_right_to_left</function></member> + <!-- RFC: https://wiki.php.net/rfc/grapheme_levenshtein --> + <member><function>grapheme_levenshtein</function></member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.opcache"> + <title>Opcache</title> + + <simplelist> + <member><function>opcache_is_script_cached_in_file_cache</function></member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.pdo-sqlite"> + <title>PDO_SQLITE</title> + <simplelist> + <member> + <methodname>Pdo\Sqlite::setAuthorizer</methodname> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.pgsql"> + <title>PGSQL</title> + + <simplelist> + <member><function>pg_close_stmt</function></member> + <member><function>pg_service</function></member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.reflection"> + <title>Reflection</title> + + <simplelist> + <member> + <methodname>ReflectionConstant::getFileName</methodname> + </member> + <member> + <methodname>ReflectionConstant::getExtension</methodname> + </member> + <member> + <methodname>ReflectionConstant::getExtensionName</methodname> + </member> + <!-- RFC: https://wiki.php.net/rfc/attributes-on-constants --> + <member> + <methodname>ReflectionConstant::getAttributes</methodname> + </member> + <member> + <methodname>ReflectionProperty::getMangledName</methodname> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.sqlite"> + <title>Sqlite</title> + + <simplelist> + <member> + <methodname>Sqlite3Stmt::busy</methodname> + </member> + </simplelist> + </sect2> + + <sect2 xml:id="migration85.new-functions.standard"> + <title>Standard</title> + + <simplelist> + <!-- RFC: https://wiki.php.net/rfc/array_first_last --> + <member><function>array_first</function></member> + <member><function>array_last</function></member> + </simplelist> + </sect2> + +</sect1> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml new file mode 100644 index 000000000000..19e5e55a4147 --- /dev/null +++ b/appendices/migration85/other-changes.xml @@ -0,0 +1,627 @@ +<?xml version="1.0" encoding="utf-8"?> +<sect1 xml:id="migration85.other-changes"> + <title>Other Changes</title> + + <sect2 xml:id="migration85.other-changes.core"> + <title>Core changes</title> + + <sect3 xml:id="migration85.other-changes.core.core"> + <title>Core</title> + + <simpara> + The high resolution timer (<function>hrtime</function>) on macOS now + uses the recommended + <code>clock_gettime_nsec_np(CLOCK_UPTIME_RAW)</code> API instead of + <code>mach_absolute_time()</code>. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.core.cgi-cli"> + <title>CGI/CLI</title> + + <simpara> + The <option>-z</option> or <option>--zend-extension</option> option + has been removed as it was non-functional. + Use <option>-d zend_extension=[path]</option> instead. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.core.pdo-odbc"> + <title>PDO_ODBC</title> + + <simpara> + The fetch behaviour for larger columns has been changed. Rather than + fetching 256 byte blocks, PDO_ODBC will try to fetch a larger block size; + currently, this is the page size minus string overhead. Drivers that + return SQL_NO_TOTAL in SQLGetData are also better handled as well. + This should improve compatibility and performance. + <!-- See: GH-10809, GH-10733 --> + </simpara> + + </sect3> + + </sect2> + + <sect2 xml:id="migration85.other-changes.sapi"> + <title>Changes in SAPI Modules</title> + + <sect3 xml:id="migration85.other-changes.sapi.cli"> + <title>CLI</title> + + <simpara> + Trying to set a process title that is too long with + <function>cli_set_process_title</function> will now fail instead of + silently truncating the given title. + </simpara> + + <simpara> + Added a new <option>--ini=diff</option> option to print INI settings + changed from the builtin default. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.sapi.fpm"> + <title>FPM</title> + + <simpara> + FPM with httpd ProxyPass optionally decodes the full script path. Added + <!-- <link linkend="ini.fastcgi.script_path_encoded"-->fastcgi.script_path_encoded<!-- </link> --> + INI setting to prevent this new behavior. + </simpara> + + <simpara> + FPM access log limit now respects <link linkend="log-limit">log_limit</link> value. + </simpara> + + </sect3> + + </sect2> + + <sect2 xml:id="migration85.other-changes.functions"> + <title>Changed Functions</title> + + <sect3 xml:id="migration85.other-changes.functions.intl"> + <title>Intl</title> + + <simpara> + <function>grapheme_extract</function> properly assigns + <parameter>$next</parameter> value when skipping over invalid starting bytes. + Previously there were cases where it would point to the start of the + grapheme boundary instead of the end. + </simpara> + + <simpara> + <function>transliterator_get_error_code</function>, + <function>transliterator_get_error_message</function>, + <methodname>TransLiterator::getErrorCode</methodname>, + and <methodname>TransLiterator::getErrorMessage</methodname> + have dropped &false; from the return type union. Returning &false; + was actually never possible. + </simpara> + + <simpara> + The following functions now support a <parameter>$locale</parameter> argument: + <function>grapheme_strpos</function>, + <function>grapheme_stripos</function>, + <function>grapheme_strrpos</function>, + <function>grapheme_strripos</function>, + <function>grapheme_substr</function>, + <function>grapheme_strstr</function> and + <function>grapheme_stristr</function> + <!-- RFC: https://wiki.php.net/rfc/grapheme_add_locale_for_case_insensitive --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.ldap"> + <title>LDAP</title> + + <simpara> + <function>ldap_get_option</function> now accepts a &null; connection, + like <function>ldap_set_option</function>, to allow retrieval of global + options. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.libxml"> + <title>libxml</title> + + <simpara> + <function>libxml_set_external_entity_loader</function> now has a formal + return type of <type>true</type>. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.openssl"> + <title>OpenSSL</title> + + <simpara> + <function>openssl_public_encrypt</function> and + <function>openssl_private_decrypt</function> have a new parameter + <parameter>$digest_algo</parameter> that allows specifying the hash + digest algorithm for OAEP padding. + </simpara> + + <simpara> + <function>openssl_sign</function> and <function>openssl_verify</function> + have a new parameter <parameter>$padding</parameter> to allow using more + secure RSA PSS padding. + </simpara> + + <simpara> + <function>openssl_cms_encrypt</function> <parameter>$cipher_algo</parameter> + parameter can be a string with the cipher name. + That allows to use more algorithms including AES GCM cipher algorithms for + auth enveloped data. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.pcntl"> + <title>PCNTL</title> + + <simpara> + <function>pcntl_exec</function> now has a formal return type of + <type>false</type>. + </simpara> + + <simpara> + <function>pcntl_waitid</function> takes an additional resource_usage + argument to gather various platform specific metrics about the child process. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.pdo-pgsql"> + <title>PDO_PGSQL</title> + + <simpara> + <methodname>Pdo\Pgsql::copyFromArray</methodname> now supports <type>iterable</type> inputs. + </simpara> + + <simpara> + <methodname>Pdo\Pgsql::setAttribute</methodname> and + <methodname>Pdo\Pgsql::prepare</methodname> support setting + <constant>PDO::ATTR_PREFETCH</constant> to 0 which enters lazy fetch mode. + In this mode, statements cannot be run in parallel. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.pgsql"> + <title>PostgreSQL</title> + + <simpara> + <function>pg_copy_from</function> now supports <type>iterable</type> inputs. + </simpara> + + <simpara> + <function>pg_connect</function> checks if the connection_string argument + contains any null byte. + </simpara> + + <simpara> + <function>pg_close_stmt</function> checks if the statement_name argument + contains any null byte. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.posix"> + <title>POSIX</title> + + <simpara> + <function>posix_ttyname</function> sets last_error to EBADF when encountering + an invalid file descriptor. + </simpara> + + <simpara> + <function>posix_isatty</function> raises an <constant>E_WARNING</constant> + message when encountering an invalid file descriptor. + </simpara> + + <simpara> + <function>posix_fpathconf</function> checks invalid file descriptors and + sets last_error to EBADF and raises an <constant>E_WARNING</constant> message. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.reflection"> + <title>Reflection</title> + + <simpara> + The output of <methodname>ReflectionClass::__toString</methodname> for + enums has changed to better indicate that the class is an enum, and that + the enum cases are enum cases rather than normal class constants. + </simpara> + + <simpara> + The output of <methodname>ReflectionProperty::__toString</methodname> for + properties with hooks has changed to indicate what hooks the property has, + whether those hooks are final, and whether the property is virtual. + This also affects the output of <methodname>ReflectionClass::__toString</methodname> + when a class contains hooked properties. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.sockets"> + <title>Sockets</title> + + <simpara> + <function>socket_create</function>/<function>socket_bind</function> can + create <constant>AF_PACKET</constant> family sockets. + </simpara> + + <simpara> + <function>socket_getsockname</function> gets the interface index and its + string representation with <constant>AF_PACKET</constant> socket. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.functions.zlib"> + <title>Zlib</title> + + <simpara> + The <parameter>$use_include_path</parameter> argument for the + <function>gzfile</function>, <function>gzopen</function> and + <function>readgzfile</function> functions has been changed + from <type>int</type> to <type>boolean</type>. + </simpara> + + <simpara> + <function>gzfile</function>, + <function>gzopen</function> and <function>readgzfile</function> functions + now respect the default stream context. + </simpara> + + </sect3> + + </sect2> + + <sect2 xml:id="migration85.other-changes.extensions"> + <title>Other Changes to Extensions</title> + + <sect3 xml:id="migration85.other-changes.extensions.curl"> + <title>cURL</title> + + <simpara> + <function>curl_setopt</function> with + <constant>CURLOPT_FOLLOWLOCATION</constant> option's value + no longer is treated as boolean but integer to handle + <constant>CURLFOLLOW_OBEYCODE</constant> and + <constant>CURLFOLLOW_FIRSTONLY</constant>. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.extensions.fileinfo"> + <title>Fileinfo</title> + + <simpara> + Upgraded file from 5.45 to 5.46. + </simpara> + + <simpara> + The return type of <function>finfo_close</function> has been changed to + <type>true</type>, rather than <type>bool</type>. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.extensions.intl"> + <title>Intl</title> + + <simpara> + Intl's internal error mechanism has been modernized so that it + indicates more accurately which call site caused what error. + Moreover, some ext/date exceptions have been wrapped inside a + <classname>IntlException</classname> now. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.extensions.lexbor"> + <title>Lexbor</title> + + <simpara> + An always enabled lexbor extension is added. It contains the lexbor + library that was separated from <link linkend="book.dom">ext/dom</link> + for being reused among other extensions. + The new extension is not directly exposed to userland. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.extensions.opcache"> + <title>Opcache</title> + + <simpara> + The <link linkend="book.opcache">Opcache extension</link> is now always + built into the PHP binary and is always loaded. + The INI directives <link linkend="ini.opcache.enable">opcache.enable</link> + and <link linkend="ini.opcache.enable-cli">opcache.enable_cli</link> are + still honored. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.extensions.pcre"> + <title>PCRE</title> + + <simpara> + Upgraded pcre2lib from 10.44 to 10.46. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.extensions.pdo-sqlite"> + <title>PDO_Sqlite</title> + + <simpara> + Increased minimum release version support from 3.7.7 to 3.7.17. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.extensions.readline"> + <title>Readline</title> + + <simpara> + The return types of <function>readline_add_history</function>, + <function>readline_clear_history</function>, + and <function>readline_callback_handler_install</function> have been + changed to <type>true</type>, rather than <type>bool</type>. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.extensions.reflection"> + <title>Reflection</title> + + <simpara> + <classname>ReflectionConstant</classname> is no longer final. + </simpara> + + </sect3> + + </sect2> + + <sect2 xml:id="migration85.other-changes.ini"> + <title>Changes to INI File Handling</title> + + <sect3 xml:id="migration85.other-changes.ini.core"> + <title>Core</title> + + <simpara> + Added fatal_error_backtraces to control whether fatal errors should include + a backtrace. + <!-- RFC: https://wiki.php.net/rfc/error_backtraces_v2 --> + </simpara> + + <simpara> + Added startup-only max_memory_limit INI setting to control the maximum + memory_limit that may be configured at startup or runtime. Exceeding this + value emits a warning, unless set to -1, and sets memory_limit to the + current max_memory_limit instead. + <!-- ML discussion: https://externals.io/message/127108 --> + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.ini.opcache"> + <title>Opcache</title> + + <simpara> + Added opcache.file_cache_read_only to support a read-only + <link linkend="ini.opcache.file-cache">opcache.file_cache</link> directory, + for use with read-only file systems (e.g. read-only Docker containers). + Best used with <literal>opcache.validate_timestamps=0</literal>, + <literal>opcache.enable_file_override=1</literal>, + and <literal>opcache.file_cache_consistency_checks=0</literal>. + </simpara> + + <note> + <simpara> + A cache generated with a different build of PHP, a different file + path, or different settings (including which extensions are loaded), may be + ignored. + </simpara> + </note> + + <simpara> + The default value of + <link linkend="ini.opcache.jit-hot-loop">opcache.jit_hot_loop</link> is + now 61 (a prime) to prevent it from being a multiple of loop iteration + counts. + It is recommended that this parameter is set to a prime number. + </simpara> + + <simpara> + Changing <link + linkend="ini.opcache.memory-consumption">opcache.memory_consumption</link> + when OPcache SHM is already set up will now correctly report a failure + instead of silently doing nothing and showing misleading values in PHPInfo. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.ini.openssl"> + <title>OpenSSL</title> + + <simpara> + Added <!-- <link linkend="ini.openssl.libctx"-->openssl.libctx<!-- </link> --> + to select the OpenSSL library context type. + Either custom libctx for each thread can be used or a single global (default) + libctx is used. + </simpara> + + </sect3> + + </sect2> + + <sect2 xml:id="migration85.other-changes.performance"> + <title>Performance</title> + + <sect3 xml:id="migration85.other-changes.performance.core"> + <title>Core</title> + + <simpara> + Remove OPcodes for identity comparisons against booleans, particularly + for the <code>match(true)</code> pattern. + </simpara> + + <simpara> + Add OPcode specialization for <code>=== []</code> and + <code>!== []</code> comparisons. + </simpara> + + <simpara> + Creating exception objects is now much faster. + </simpara> + + <simpara> + The parts of the code that used SSE2 have been adapted to use SIMD + with ARM NEON as well. + </simpara> + + <simpara> + Introduced the TAILCALL VM, enabled by default when compiling with Clang>=19 + on x86_64 or aarch64. The TAILCALL VM is as fast as the HYBRID VM used when + compiling with GCC. This makes PHP binaries built with Clang>=19 as fast as + binaries built with GCC. The performance of the CALL VM, used with other + compilers, has also improved considerably. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.performance.intl"> + <title>Intl</title> + + <simpara> + Now avoids creating extra string copies when converting strings + for use in the collator. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.performance.mbstring"> + <title>MBString</title> + + <simpara> + The parts of the code that used SSE2 have been adapted to use SIMD + with ARM NEON as well. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.performance.opcache"> + <title>Opcache</title> + + <simpara> + Improved performance of fetching TLS variables in JIT'ed code in non-Glibc + builds. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.performance.reflection"> + <title>Reflection</title> + + <para> + Improved performance of the following methods: + <simplelist> + <member><methodname>ReflectionProperty::getValue</methodname></member> + <member><methodname>ReflectionProperty::getRawValue</methodname></member> + <member><methodname>ReflectionProperty::isInitialized</methodname></member> + <member><methodname>ReflectionProperty::isInitialized</methodname></member> + <member><methodname>ReflectionProperty::setValue</methodname></member> + <member><methodname>ReflectionProperty::setRawValue</methodname></member> + </simplelist> + </para> + + </sect3> + + <sect3 xml:id="migration85.other-changes.performance.spl"> + <title>SPL</title> + + <simpara> + Improved performance of dimension accessors and methods of + <classname>SplFixedArray</classname>. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.performance.standard"> + <title>Standard</title> + + <simpara> + Improved performance of array functions with callbacks + (<function>array_find</function>, <function>array_filter</function>, + <function>array_map</function>, <function>usort</function>, ...). + </simpara> + + <simpara> + Improved performance of <function>urlencode</function> and + <function>rawurlencode</function>. + </simpara> + + <simpara> + Improved <function>unpack</function> performance with nameless + repetitions by avoiding creating temporary strings and reparsing them. + </simpara> + + <simpara> + Improved <function>pack</function> performance. + </simpara> + + <simpara> + Minor improvements in <function>array_chunk</function> performance. + </simpara> + + </sect3> + + <sect3 xml:id="migration85.other-changes.performance.xml"> + <title>XML</title> + + <simpara> + Improved <classname>XMLReader</classname> property access performance. + </simpara> + + <simpara> + Improved <classname>XMLWriter</classname> performance and reduced memory + consumption. + </simpara> + + </sect3> + + </sect2> + +</sect1> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/appendices/migration85/windows-support.xml b/appendices/migration85/windows-support.xml new file mode 100644 index 000000000000..b84f24312c7f --- /dev/null +++ b/appendices/migration85/windows-support.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?> +<sect1 xml:id="migration85.windows-support"> + <title>Windows Support</title> + + <sect2 xml:id="migration85.windows-support.core"> + <title>Core</title> + + <simpara> + The configuration variables <constant>PHP_VERSION</constant>, + <constant>PHP_MINOR_VERSION</constant>, and + <constant>PHP_RELEASE_VERSION</constant> are now always numbers. + Previously, they have been strings for buildconf builds. + </simpara> + + <simpara> + <command>phpize</command> builds now reflect the source tree in the + build dir (as it already worked for in-tree builds); some extension + builds (especially when using Makefile.frag.w32) may need adjustments. + </simpara> + + <simpara> + <option role="configure">--enable-sanitizer</option> is now supported + for MSVC builds. This enables ASan and debug assertions, and is supported + as of MSVC 16.10 and Windows 10. + </simpara> + + <simpara> + The <option role="configure">--with-uncritical-warn-choke</option> + configuration option for clang builds is no longer supported. + Select warnings to suppress via CFLAGS instead. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.windows-support.com"> + <title>COM</title> + + <simpara> + The extension is now build shared by default; previously it defaulted to a + static extension, although the official Windows binaries built a shared + extension. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.windows-support.ffi"> + <title>FFI</title> + + <simpara> + It is no longer necessary to specify the library when using + <methodname>FFI::cdef</methodname> and <methodname>FFI::load</methodname>. + However, this convenience feature should not be used in production. + </simpara> + + </sect2> + + <sect2 xml:id="migration85.windows-support.streams"> + <title>Streams</title> + + <simpara> + If only pipe streams are contained in the <parameter>$read</parameter> + array, and the <parameter>$write</parameter> and + <parameter>$except</parameter> arrays are empty, + <function>stream_select</function> now behaves similar to POSIX systems, + i.e. the function only returns if at least one pipe is ready to be read, + or after the timeout expires. + Previously, <function>stream_select</function> returned immediately, + reporting all streams as ready to read. + </simpara> + + </sect2> + +</sect1> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +-->