From e9f6660323c01830f0b28cd333bb31174e0494cb Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 18 Oct 2025 21:43:51 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[wip]=20PHP=208.5=20=E7=A7=BB=E8=A1=8C?= =?UTF-8?q?=E3=82=AC=E3=82=A4=E3=83=89=E6=97=A5=E6=9C=AC=E8=AA=9E=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appendices/migration85.xml | 55 ++ appendices/migration85/constants.xml | 190 ++++++ appendices/migration85/deprecated.xml | 542 +++++++++++++++ appendices/migration85/incompatible.xml | 481 +++++++++++++ appendices/migration85/new-classes.xml | 67 ++ appendices/migration85/new-features.xml | 527 ++++++++++++++ appendices/migration85/new-functions.xml | 150 ++++ appendices/migration85/other-changes.xml | 760 +++++++++++++++++++++ appendices/migration85/windows-support.xml | 103 +++ 9 files changed, 2875 insertions(+) create mode 100644 appendices/migration85.xml create mode 100644 appendices/migration85/constants.xml create mode 100644 appendices/migration85/deprecated.xml create mode 100644 appendices/migration85/incompatible.xml create mode 100644 appendices/migration85/new-classes.xml create mode 100644 appendices/migration85/new-features.xml create mode 100644 appendices/migration85/new-functions.xml create mode 100644 appendices/migration85/other-changes.xml create mode 100644 appendices/migration85/windows-support.xml diff --git a/appendices/migration85.xml b/appendices/migration85.xml new file mode 100644 index 0000000000..4bc1ca9326 --- /dev/null +++ b/appendices/migration85.xml @@ -0,0 +1,55 @@ + + + PHP 8.4.x から PHP 8.5.x への移行 + + + この新しいマイナーバージョンには、 + たくさんの 新機能 と + 互換性のない変更がいくつか + あります。実運用環境の PHP をこのバージョンにあげる前に、 + これらの変更を必ずテストすべきです。 + + + + &manual.migration.seealso; + 7.1.x, + 7.2.x, + 7.3.x, + 7.4.x, + 8.0.x, + 8.1.x, + 8.2.x. + 8.3.x. + 8.4.x. + + + &appendices.migration85.new-features; + &appendices.migration85.new-classes; + &appendices.migration85.new-functions; + &appendices.migration85.constants; + &appendices.migration85.incompatible; + &appendices.migration85.deprecated; + &appendices.migration85.other-changes; + &appendices.migration85.windows-support; + + + diff --git a/appendices/migration85/constants.xml b/appendices/migration85/constants.xml new file mode 100644 index 0000000000..a6f96396c2 --- /dev/null +++ b/appendices/migration85/constants.xml @@ -0,0 +1,190 @@ + + + 新しいグローバル定数 + + + PHP コア + + + + PHP_BUILD_DATE + + + PHP_BUILD_PROVIDER + + + + + + cURL + + + + CURLINFO_USED_PROXY + + + CURLINFO_HTTPAUTH_USED + + + CURLINFO_PROXYAUTH_USED + + + CURLINFO_CONN_ID + + + CURLINFO_QUEUE_TIME_T + + + CURLOPT_INFILESIZE_LARGE + + + CURLFOLLOW_ALL + + + CURLFOLLOW_OBEYCODE + + + CURLFOLLOW_FIRSTONLY + + + + + + Filter + + + + FILTER_THROW_ON_FAILURE + + + + + + Intl + + + + DECIMAL_COMPACT_SHORT + + + DECIMAL_COMPACT_LONG + + + + + + OpenSSL + + + OPENSSL_PKCS1_PSS_PADDING + PKCS7_NOSMIMECAP + PKCS7_CRLFEOL + PKCS7_NOCRL + PKCS7_NO_DUAL_CONTENT + + + + + POSIX + + + POSIX_SC_OPEN_MAX + + + + + Sockets + + + + IPPROTO_ICMP + + + IPPROTO_ICMPV6 + + + TCP_FUNCTION_BLK (FreeBSD only) + + + TCP_FUNCTION_ALIAS (FreeBSD only) + + + TCP_REUSPORT_LB_NUMA (FreeBSD only) + + + TCP_REUSPORT_LB_NUMA_NODOM (FreeBSD only) + + + TCP_REUSPORT_LB_NUMA_CURDOM (FreeBSD only) + + + TCP_BBR_ALGORITHM (FreeBSD only) + + + AF_PACKET (Linux only) + + + IP_BINDANY (FreeBSD/NetBSD/OpenBSD only) + + + SO_BUSY_POLL (Linux only) + + + UDP_SEGMENT (Linux only) + + + SHUT_RD + + + SHUT_WR + + + SHUT_RDWR + + + + + + Tokenizer + + + T_VOID_CAST + + + T_PIPE + + + + + + Standard + + + + IMAGETYPE_SVG + when libxml is loaded. + + + + + + diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml new file mode 100644 index 0000000000..18b0a76d96 --- /dev/null +++ b/appendices/migration85/deprecated.xml @@ -0,0 +1,542 @@ + + + Deprecated Features + + + PHP Core + + + Changes to user output handler + + + + Returning a non-string from a user output handler is deprecated. The + deprecation warning will bypass the handler with the bad return to ensure + it is visible; if there are nested output handlers the next one will still + be used. + + + + Trying to produce output (e.g. with echo) within + a user output handler is deprecated. + The deprecation warning will bypass the handler producing the output to + ensure it is visible; if there are nested output handlers the next + one will still be used. If a user output handler returns a non-string and + produces output, the warning about producing an output is emitted first. + + + + + + Non-canonical cast names + + + + Non-canonical cast names (boolean), + (integer), (double), + and (binary) have been deprecated, + use (bool), (int), + (float), and (string) respectively. + + + + + + Terminating case statements with a semicolon + + + + Terminating case statements with a semicolon instead of a colon has + been deprecated. + + + + + + The backtick operator + + + + The backtick operator + as an alias for shell_exec has been deprecated. + + + + + + Returning null from __debugInfo() + + + + Returning &null; from + __debugInfo() + has been deprecated. Return an empty array instead. + + + + + + report_memleaks INI directive + + + + The report_memleaks INI directive + has been deprecated. + + + + + + Constant redeclaration + + + + Constant redeclaration has been deprecated. + + + + + + Closure binding issues + + + + The following closure binding issues, which already emit an + E_WARNING, are now deprecated: + + + Binding an instance to a static closure. + Binding methods to objects that are not instances of the class + (or subclass) that the method is defined. + Unbinding $this from a method. + Unbinding $this from a closure that uses `$this`. + Binding a closure to the scope of an internal class. + Rebinding the scope of a closure created from a function or method. + + + + + + + __sleep() and __wakeup() magic methods + + + + + The __sleep() and + __wakeup() magic methods + have been soft-deprecated. + The __serialize() and + __unserialize() magic + methods should be used instead, or at the same time if compatibility + with PHP 7 is required. + + + + + + Using null as an array offset + + + + Using null as an array offset or when calling array_key_exists + is now deprecated. Instead an empty string should be used. + + + + + + Incrementing non-numeric strings + + + + Incrementing non-numeric strings is now deprecated. + Instead the str_increment function should be used. + + + + + + register_argc_argv INI directive + + + + Deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string for + non-CLI SAPIs has been deprecated. + Configure register_argc_argv=0 and switch to either $_GET or + $_SERVER['QUERY_STRING'] to access the information, after verifying + that the usage is safe. + + + + + + + + cURL + + + The curl_close function has been deprecated, + as CurlHandle objects are freed automatically. + + + + + The curl_share_close function has been deprecated, + as CurlShareHandle objects are freed automatically. + + + + + + + Date + + + The DATE_RFC7231 and + DateTimeInterface::RFC7231 constants have been deprecated. + This is because the associated timezone is ignored and always uses GMT. + + + + + The __wakeup() magic method of + DateTimeInterface, + DateTime, DateTimeImmutable, + DateTimeZone, DateInterval, + and DatePeriod has been deprecated in favour of + the __unserialize() magic method. + + + + + + + FileInfo + + + The finfo_close function has been deprecated. + As finfo objects are freed automatically. + + + + + The $context parameter of the + finfo_buffer function has been deprecated + as it is ignored. + + + + + + + GD + + + The imagedestroy function has been deprecated, + as GdImage objects are freed automatically. + + + + + + + Hash + + + The MHASH_* constants + have been deprecated. These have been overlooked when the mhash*() function + family has been deprecated per + + + + + + + Intl + + + The intl.error_level INI setting + has been deprecated. + Errors should either be checked manually or exceptions should be enabled by + using the intl.use_exceptions + INI setting. + + + + + + + LDAP + + + Specific Oracle Instant Client calls and constants have been deprecated. + + List of affected calls: + + ldap_connect with wallet support + ldap_connect_wallet + + + List of affected constants: + + GSLC_SSL_NO_UATH + GSLC_SSL_ONEWAY_UATH + GSLC_SSL_TWOWAY_UATH + + + + + + + + MySQLi + + + The mysqli_execute alias function has been deprecated. + Use mysqli_stmt_execute instead. + + + + + + + OpenSSL + + + The $key_length parameter for + openssl_pkey_derive has been deprecated. + This is because it is either ignored, or truncates the key, which can be + a vulnerability. + + + + + + + PDO + + + The "uri:" DSN scheme has been deprecated due to security concerns with + DSNs coming from remote URIs. + + + + + Driver specific constants in the PDO class have been deprecated. + List of affected constants and their replacement: + + + PDO::DBLIB_ATTR_CONNECTION_TIMEOUT => Pdo\Dblib::ATTR_CONNECTION_TIMEOUT + PDO::DBLIB_ATTR_QUERY_TIMEOUT => Pdo\Dblib::ATTR_QUERY_TIMEOUT + PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER => Pdo\Dblib::ATTR_STRINGIFY_UNIQUEIDENTIFIER + PDO::DBLIB_ATTR_VERSION => Pdo\Dblib::ATTR_VERSION + PDO::DBLIB_ATTR_TDS_VERSION => Pdo\Dblib::ATTR_TDS_VERSION + PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS => Pdo\Dblib::ATTR_SKIP_EMPTY_ROWSETS + PDO::DBLIB_ATTR_DATETIME_CONVERT => Pdo\Dblib::ATTR_DATETIME_CONVERT + PDO::FB_ATTR_DATE_FORMAT => Pdo\Firebird::ATTR_DATE_FORMAT + PDO::FB_ATTR_TIME_FORMAT => Pdo\Firebird::ATTR_TIME_FORMAT + PDO::FB_ATTR_TIMESTAMP_FORMAT => Pdo\Firebird::ATTR_TIMESTAMP_FORMAT + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => Pdo\Mysql::ATTR_USE_BUFFERED_QUERY + PDO::MYSQL_ATTR_LOCAL_INFILE => Pdo\Mysql::ATTR_LOCAL_INFILE + PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY => Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY + PDO::MYSQL_ATTR_INIT_COMMAND => Pdo\Mysql::ATTR_INIT_COMMAND + PDO::MYSQL_ATTR_MAX_BUFFER_SIZE => Pdo\Mysql::ATTR_MAX_BUFFER_SIZE + PDO::MYSQL_ATTR_READ_DEFAULT_FILE => Pdo\Mysql::ATTR_READ_DEFAULT_FILE + PDO::MYSQL_ATTR_READ_DEFAULT_GROUP => Pdo\Mysql::ATTR_READ_DEFAULT_GROUP + PDO::MYSQL_ATTR_COMPRESS => Pdo\Mysql::ATTR_COMPRESS + PDO::MYSQL_ATTR_DIRECT_QUERY => Pdo\Mysql::ATTR_DIRECT_QUERY + PDO::MYSQL_ATTR_FOUND_ROWS => Pdo\Mysql::ATTR_FOUND_ROWS + PDO::MYSQL_ATTR_IGNORE_SPACE => Pdo\Mysql::ATTR_IGNORE_SPACE + PDO::MYSQL_ATTR_SSL_KEY => Pdo\Mysql::ATTR_SSL_KEY + PDO::MYSQL_ATTR_SSL_CERT => Pdo\Mysql::ATTR_SSL_CERT + PDO::MYSQL_ATTR_SSL_CA => Pdo\Mysql::ATTR_SSL_CA + PDO::MYSQL_ATTR_SSL_CAPATH => Pdo\Mysql::ATTR_SSL_CAPATH + PDO::MYSQL_ATTR_SSL_CIPHER => Pdo\Mysql::ATTR_SSL_CIPHER + PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT + PDO::MYSQL_ATTR_SERVER_PUBLIC_KEY => Pdo\Mysql::ATTR_SERVER_PUBLIC_KEY + PDO::MYSQL_ATTR_MULTI_STATEMENTS => Pdo\Mysql::ATTR_MULTI_STATEMENTS + PDO::ODBC_ATTR_USE_CURSOR_LIBRARY => Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY + PDO::ODBC_ATTR_ASSUME_UTF8 => Pdo\Odbc::ATTR_ASSUME_UTF8 + PDO::ODBC_SQL_USE_IF_NEEDED => Pdo\Odbc::SQL_USE_IF_NEEDED + PDO::ODBC_SQL_USE_DRIVER => Pdo\Odbc::SQL_USE_DRIVER + PDO::ODBC_SQL_USE_ODBC => Pdo\Odbc::SQL_USE_ODBC + PDO::PGSQL_ATTR_DISABLE_PREPARES => Pdo\Pgsql::ATTR_DISABLE_PREPARES + PDO::SQLITE_ATTR_EXTENDED_RESULT_CODES => Pdo\Sqlite::ATTR_EXTENDED_RESULT_CODES + PDO::SQLITE_ATTR_OPEN_FLAGS => Pdo\Sqlite::OPEN_FLAGS + PDO::SQLITE_ATTR_READONLY_STATEMENT => Pdo\Sqlite::ATTR_READONLY_STATEMENT + PDO::SQLITE_DETERMINISTIC => Pdo\Sqlite::DETERMINISTIC + PDO::SQLITE_OPEN_READONLY => Pdo\Sqlite::OPEN_READONLY + PDO::SQLITE_OPEN_READWRITE => Pdo\Sqlite::OPEN_READWRITE + PDO::SQLITE_OPEN_CREATE => Pdo\Sqlite::OPEN_CREATE + + + + + + Driver specific methods in the PDO class have been deprecated. + List of affected methods and their replacement: + + + PDO::pgsqlCopyFromArray => Pdo\Pgsql::copyFromArray + PDO::pgsqlCopyFromFile => Pdo\Pgsql::copyFromFile + PDO::pgsqlCopyToArray => Pdo\Pgsql::copyToArray + PDO::pgsqlCopyToFile => Pdo\Pgsql::copyToFile + PDO::pgsqlGetNotify => Pdo\Pgsql::getNotify + PDO::pgsqlGetPid => Pdo\Pgsql::getPid + PDO::pgsqlLOBCreate => Pdo\Pgsql::lobCreate + PDO::pgsqlLOBOpen => Pdo\Pgsql::lobOpen + PDO::pgsqlLOBUnlink => Pdo\Pgsql::lobUnlink + PDO::sqliteCreateAggregate => Pdo\Sqlite::createAggregate + PDO::sqliteCreateCollation => Pdo\Sqlite::createCollation + PDO::sqliteCreateFunction => Pdo\Sqlite::createFunction + + + + + + + + PDO_PGSQL + + + Constants related to transaction states have been deprecated: + + + PDO::PGSQL_TRANSACTION_IDLE + PDO::PGSQL_TRANSACTION_ACTIVE + PDO::PGSQL_TRANSACTION_INTRANS + PDO::PGSQL_TRANSACTION_INERROR + PDO::PGSQL_TRANSACTION_UNKNOWN + + + + + + + + Reflection + + + The setAccessible() methods of various Reflection objects have been + deprecated, as those no longer have an effect. + + + + + Calling ReflectionClass::getConstant for constants + that do not exist has been deprecated. + + + + + Calling ReflectionProperty::getDefaultValue for + properties without default values has been deprecated. + + + + + + + SPL + + + Unregistering all autoloaders by passing the + spl_autoload_call function as a callback argument to + spl_autoload_unregister has been deprecated. + Instead if this is needed, one should iterate over the return value of + spl_autoload_functions and call + spl_autoload_unregister on each value. + + + + + The SplObjectStorage::contains, + SplObjectStorage::attach, and + SplObjectStorage::detach methods have been deprecated + in favour of SplObjectStorage::offsetExists, + SplObjectStorage::offsetSet, and + SplObjectStorage::offsetUnset respectively. + + + + + Using ArrayObject and + ArrayIterator with objects has been deprecated. + + + + + + + Standard + + + The socket_set_timeout alias function has been deprecated. + Use stream_set_timeout instead. + + + + + Passing &null; to to readdir, + rewinddir, and closedir + to use the last opened directory has been deprecated. + Provide the last opened directory explicitly instead. + + + + + Passing integers outside the interval [0, 255] to chr + is now deprecated. + This is because a byte can only hold a value within this interval. + + + + + Passing a string which is not a single byte to ord + is now deprecated, this is indicative of a bug. + + + + + The locally predefined variable + $http_response_header + is deprecated. Instead one should call the + http_get_last_response_headers function. + + + + + + + XML + + + The xml_parser_free function has been deprecated, + as XMLParser objects are freed automatically. + + + + + + + diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml new file mode 100644 index 0000000000..1c586f2246 --- /dev/null +++ b/appendices/migration85/incompatible.xml @@ -0,0 +1,481 @@ + + + 下位互換性のない変更点 + + + PHP コア + + + クラスの別名に <literal>"array"</literal> と <literal>"callable"</literal> を使う + + + class_alias では、 + クラスのエイリアス名として、"array" + と "callable" を指定できなくなりました。 + + + + + + 比較できないオブジェクトと == で比較する + + + 比較できないオブジェクト + (例: 列挙型, CurlHandle, + その他の内部クラス) を boolean と比較した場合の振る舞いは、 + 以前のバージョンでは一貫性がありませんでした。 + boolean リテラルと $object == true + のように比較した場合、(bool)$object + と同じ振る舞いをしていました。 + 静的に不明な値と $object == $true + のように比較した場合、常に &false; を返していました。 + これらの振る舞いが、常に (bool)$object + に従うように統一されました。 + + + + + + gc_collect_cycles の戻り値 + + + gc_collect_cycles の戻り値には、 + 間接的に収集されたリソースや文字列が含まれなくなりました。 + + + + + + final 指定のサブクラスでの static キーワードの置き換え + + + final を指定したサブクラスにおける、メソッドの戻り値 static は、 + self または具象クラスに置き換えられるようになりました。 + + + + + + + + tick ハンドラ + + + tick ハンドラは、 + すべてのシャットダウン関数とデストラクタが実行され、 + 出力ハンドラがクリーンアップされた後に、 + 無効化されるようになりました。 + + + + + + トレイトのバインド + + + トレイトは、親クラスの前にバインドされるようになりました。 + これは微妙な振る舞いの変更ですが、 + ユーザーの期待により一致するはずです。 + + + + + + + コンパイル中やクラスのリンク中に発生したエラー + + + コンパイル中やクラスのリンク中に発生したエラーは、 + 常に処理が遅延されるようになりました。 + これらのエラーは、コンパイルまたはクラスのリンク後に処理されます。 + コンパイル中やクラスのリンク中に致命的なエラーが発生した場合、 + 遅延させられていたエラーがすぐに処理されます。 + この場合、ユーザー定義のエラーハンドラを呼び出しません。 + + + + + + + ユーザー定義のエラーハンドラからスローされた例外 + + + クラスのリンク処理時に、 + ユーザー定義のエラーハンドラからスローされた例外は、 + 致命的なエラーに昇格しなくなり、リンクを妨げなくなりました。 + + + + + + + コンパイル中のアトリビュート適用エラー + + + 抽象クラス、列挙型、インターフェース、 + またはトレイトにアトリビュートを適用すると、 + コンパイル時にエラーが発生します。 + 以前のバージョンではアトリビュートを追加できていましたが、 + ReflectionAttribute::newInstance + がコールされた際に Error がスローされていました。 + 新しい #[\DelayedTargetValidation] アトリビュートを使うと、 + このエラーをコンパイル時から実行時に遅延させることできます。 + + + + + + disable_classes INI ディレクティブ + + + さまざまな PHP エンジンの想定を壊してしまうため、 + disable_classes + INI ディレティブは削除されました。 + + + + + + + 配列でない値を分解した場合 + + + (NULL を除く)配列でない値を、 + [] や list() で分解した場合、警告が発生するようになりました。 + + + + + + + キャスト関連の警告 + + + 浮動小数点数(または浮動小数点数のように見える文字列) + を int 型にキャストする際、 + それらが int 型として表現できない場合に警告が発生するようになりました。 + これは明示的な int キャストと暗黙的な int キャストの両方に影響します。 + + + + + NAN を他の型にキャストした場合、警告が発生するようになりました。 + + + + + + + + + Bzip2 + + + $block_size に 1 から 9 の間以外の値を指定した場合、 + bzcompressValueError + をスローするようになりました。 + + + + $work_factor に 0 から 250 の間以外の値を指定した場合、 + bzcompressValueError + をスローするようになりました。 + + + + + + DOM + + + DOMNamedNodeMap, + DOMNodeList, + Dom\NamedNodeMap, + Dom\NodeList, + Dom\HTMLCollection, + Dom\DtdNamedNodeMap を clone すると、 + 失敗するようになりました。 + 現在動いているオブジェクトが、実際に失敗することはありません。 + よって、実際の影響はゼロのはずです。 + + + + + + FileInfo + + + $filename に nul バイトが含まれている場合、 + finfo_file と + finfo::file は、 + TypeError ではなく + ValueError をスローするようになりました。 + これにより、スローされるエラーの型が、 + 言語の他の動作と一貫性を保つように調整されます。 + + + + + + Intl + + + この拡張モジュールは、ICU 57.1 以降が必須になりました。 + + + + 数値形式の文字列の処理に関する + Collator::SORT_REGULAR の動作が、 + ext/standard の SORT_REGULAR + の動作と同じになるように調整されました。 + + + + + + LDAP + + + 不正なオプションを渡した場合、 + ldap_get_option + と ldap_set_optionValueError + をスローするようになりました。 + + + + + + MBString + + + Unicode データテーブルが、Unicode 17.0 に更新されました。 + + + + + + MySQLi + + + 既に構築済みのオブジェクトに対して、 + mysqli のコンストラクタをコールすることはできなくなりました。 + コールした場合、Error がスローされます。 + + + + + + ODBC + + + ODBC は、最低でも ODBC 3.5 の機能が使えると想定するようになりました。 + ODBCVER の定義や、それを制御するビルドシステムフラグは削除されました。 + + + + ODBC は、 + 特定のドライバ向けにビルドするためのビルドフラグを(DB2以外に) + 持たなくなり、 + それらのドライバ向けの特別なケースも削除されました。 + Windows 以外の環境では、 + iODBC や unixODBC のようなドライバマネージャの使用を強く推奨します。 + + + + + + Opcache + + + Opcache 拡張モジュールは、 + 常に PHP バイナリに組み込まれ、ロードされるようになりました。 + opcache.enable + と opcache.enable_cli + の設定はまだ有効です。 + + + + / + configure オプションは削除され、 + ビルドしても opcache.so や php_opcache.dll はもはや生成されません。 + + + + zend_extension=opcache.so や + zend_extension=php_opcache.dll + INI 設定を使うと、警告が発生するようになりました。 + + + + + + PCNTL + + + pcntl_exec の + $args パラメータのエントリに、 + null バイトが含まれていた場合、 + ValueError がスローされるようになりました。 + + + + pcntl_exec の + $env_vars パラメータのエントリまたはキーに、 + null バイトが含まれていた場合、 + ValueError がスローされるようになりました。 + + + + + + PCRE + + + semi-deprecated 扱いになっていた、 + コンパイルオプション PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK + 抜きでビルドされるようになりました。 + + + + + + + PDO + + + PDO::FETCH_CLASS + と組み合わせて設定されるコンストラクタ引数は、 + 通常の CUFA (call_user_func_array) + の規約に従うようになりました。 + つまり、文字列のキーは名前付き引数のように振る舞うということです。 + さらに、リファレンス渡しのパラメータに渡される、 + 値渡し引数の自動ラップが廃止され、 + 通常の E_WARNING が発生するようになりました。 + コンストラクタ引数に変数をリファレンス渡しするには、 + 配列の値にリファレンスの値を代入します: $ctor_args = [&$valByRef] + + + + PDO::fetch, + PDO::fetchObject, + PDO::fetchAll の呼び出し中に、 + PDOStatement::setFetchMode を呼び出そうとすると、 + Error がスローされるようになりました。 + これはたとえば、 + オブジェクトのフェッチ中に Statement + オブジェクトをコンストラクタの引数として渡す際に、 + PDOStatement::setFetchMode を呼び出す場合が該当します。 + + + + 定数 PDO::FETCH_GROUP, + PDO::FETCH_UNIQUE, + PDO::FETCH_CLASSTYPE, + PDO::FETCH_PROPS_LATE, + PDO::FETCH_SERIALIZE の値が変更されました。 + + + + PDO::FETCH_PROPS_LATE + が PDO::FETCH_CLASS + 以外のフェッチモードと一緒に使われた場合、 + ValueError がスローされるようになりました。 + これは、他のフェッチフラグの動作と一貫性を持たせるためです。 + + + + PDO::fetchAll で、 + PDO::FETCH_INTO をフェッチモードとして使おうとすると、 + PDO::FETCH_LAZY + と同様に ValueError がスローされるようになりました。 + + + + + + PDO_FIREBIRD + + + Firebird ドライバが生成した PDOStatement + に対して、長過ぎるカーソル名を設定しようとすると、 + ValueError がスローされるようになりました。 + + + + + + Session + + + パイプ文字 (|) + が含まれたキーを持つ $_SESSION + にセッションデータを書き込もうとすると、 + 黙って失敗するのではなく、警告が発生するようになりました。 + + + + + + + SimpleXML + + + ノードの集合以外を返す XPath 式を + SimpleXMLElement::xpath + に渡した場合、警告が発生し、&false; を返すようになりました。 + これより前のバージョンでは、黙って失敗し、 + 空の配列を返していました。 + + + + + + SPL + + + + ArrayObject は 列挙型を受け入れなくなりました。 + 列挙型の $name$value + プロパティが、PHP エンジンの想定を壊す可能性があるからです。 + + + + SplFileObject::fwrite の + $length パラメータは、nullable になりました。 + デフォルト値が 0 から &null; に変更されています。 + + + + + + Standard + + + printf ファミリの関数に精度を指定しないフォーマットを使った場合、 + 精度を 0 として扱うようになりました。 + これより前のバージョンでは、誤って精度をリセットしていました。 + + + + + + diff --git a/appendices/migration85/new-classes.xml b/appendices/migration85/new-classes.xml new file mode 100644 index 0000000000..2a7e29e84a --- /dev/null +++ b/appendices/migration85/new-classes.xml @@ -0,0 +1,67 @@ + + + 新しいクラスとインターフェイス + + + PHP コア + + NoDiscard + DelayedTargetValidation + + + + + + + Curl + + CurlSharePersistentHandle + + + + + + Filter + + Filter\FilterException + Filter\FilterFailedException + + + + + + URI + + Uri\UriException + Uri\InvalidUriException + Uri\UriComparisonMode + Uri\Rfc3986\Uri + Uri\WhatWg\InvalidUrlException + Uri\WhatWg\UrlValidationErrorType + Uri\WhatWg\UrlValidationError + Uri\WhatWg\Url + + + + + + diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml new file mode 100644 index 0000000000..e3cd16e32e --- /dev/null +++ b/appendices/migration85/new-features.xml @@ -0,0 +1,527 @@ + + + 新機能 + + + PHP コア + + + パイプ演算子 + + + + パイプ演算子(|>) が追加されました。 + + + + + + strlen(...); +print $result . PHP_EOL; // Prints "11" +]]> + + + + + + 定数式にクロージャ + + + 定数式に、クロージャ や + 第一級callable + を指定できるようになりました。 + これらを指定できる箇所として、以下が挙げられます: + + + アトリビュートの引数 + プロパティやパラメーターのデフォルト値 + 定数および、クラス定数 + + + + + + + + + #[\NoDiscard] アトリビュート + + + 関数の戻り値が重要であり、 + その値を使うべきことを示すアトリビュートとして、 + NoDiscard が追加されました。 + + + + + また、値を意図的に使わないことを指示する (void) + キャストが追加されました。 + (void) キャストは、プログラムそのものの実行には影響しませんが、 + #[\NoDiscard] アトリビュートが発生させる警告や、 + 外部の IDE や静的解析ツールが発生させる可能性がある、 + 診断メッセージを抑制する目的に使えます。 + + + + + + + + + + + + + 定数に対するアトリビュート + + + クラス定数でないコンパイル時定数 + (例: define('MY_CONST', 1); ではなく、 + const MY_CONST = 1; の形で定義するもの) + に対して、アトリビュートを指定できるようになりました。 + + + + + 定数に対して、Deprecated + アトリビュートを指定できるようになりました。 + + + + + + + <code>#[\DelayedTargetValidation]</code> アトリビュート + + + 無効なターゲットに指定した、 + PHP コア(または拡張モジュール) + のアトリビュートから発生するコンパイル時エラーを抑制する手段として、 + DelayedTargetValidation + アトリビュートが追加されました。 + このアトリビュートが抑制したエラーは代わりに、 + ReflectionAttribute::newInstance + がコールされたタイミングで、実行時に報告されます。 + + + + + + + プロパティに対する <code>#[\Override]</code> 指定 + + + プロパティに、Override + アトリビュートを指定できるようになりました。 + + + + + + + static プロパティに対する、非対称可視性の指定 + + + + 非対称可視性プロパティ が、static プロパティをサポートしました。 + + + + + + + Fatal Error 発生時のバックトレース + + + (Maximum execution time exceeded のような) Fatal Error にも、 + バックトレースが含まれるようになりました。 + + + + + + + final プロパティと、コンストラクタのプロモーション + + + final なプロパティも、 + + コンストラクタでプロパティに昇格 させることができるようになりました。 + + + + + + + 定数式をキャスト + + + 定数式をキャストできるようになりました。 + + + + + + + + + + + + + + cURL + + + 複数のリクエストにまたがって持続する + CurlSharePersistentHandle + のサポートが追加されました。 + これを使うと、より効率的な接続の再利用が安全にできるようになります。 + + + + + curl_getinfo 関数に、 + CURLINFO_USED_PROXY (libcurl >= 8.7.0), + CURLINFO_HTTPAUTH_USED (libcurl >= 8.12.0), + CURLINFO_PROXYAUTH_USED (libcurl >= 8.12.0) + のサポートが追加されました。 + curl_getinfo が配列を返す場合、 + これらの情報は "used_proxy", + "httpauth_used", + "proxyauth_used" というキーで利用できます。 + + CURLINFO_USED_PROXY は、 + 直近の転送でプロキシを使った場合にゼロでない値を、 + 使わなかった場合にゼロを返します。 + + CURLINFO_HTTPAUTH_USED と + CURLINFO_PROXYAUTH_USED は、 + 直近の転送で HTTP および、プロキシ経由の認証メソッドを示す情報を、 + ビットマスクで返します。利用可能な値は、 + CURLAUTH_* + を参照ください。 + + + + CURLOPT_INFILESIZE を安全に置き換えられる、 + CURLOPT_INFILESIZE_LARGE が追加されました。 + 特定のシステムでは、たとえ 64bit システムであっても、 + CURLOPT_INFILESIZE は 32bit の符号付き整数(2.0 Gib) + しか受け入れない場合があります。 + CURLOPT_INFILESIZE_LARGE は、 + システムが扱える整数の最大値を受け入れます。 + + + + curl_setopt 関数に指定する、 + CURLOPT_FOLLOWLOCATION オプション向けに、 + CURLFOLLOW_OBEYCODE, + CURLFOLLOW_FIRSTONLY, + CURLFOLLOW_ALL が追加されました。 + + CURLFOLLOW_OBEYCODE は、 + 許可されている場合に、より厳密にリダイレクトを行います。 + + CURLFOLLOW_FIRSTONLY は、 + 最初のリダイレクトのみを行います。そのため、 + その後に後続のリダイレクトがあったとしても、それ以上はリダイレクトしません。 + + CURLFOLLOW_ALL は、 + CURLOPT_FOLLOWLOCATION + を &true; に設定することと同じです。 + + + + curl_getinfo 関数に、 + CURLINFO_CONN_ID + のサポートが追加されました (libcurl >= 8.2.0)。 + この定数を使うと、 + cURL の転送で使ったユニークな接続IDを取得できるようになります。 + このIDは、主に PHP レベルでのアプリケーションにおいて、 + 接続の再利用や接続のプーリング処理が必要な場合に役立ちます。 + curl_getinfoが配列を返す場合、 + この値は "conn_id" キーとして利用できます。 + + + + curl_getinfo 関数に、 + CURLINFO_QUEUE_TIME_T + のサポートが追加されました (libcurl >= 8.6.0)。 + この定数を使うと、 + リクエストが送信される前に libcurl + の接続キューで待機した時間(マイクロ秒単位)を取得できます。 + curl_getinfooption + パラメーターに CURLINFO_QUEUE_TIME_T + を渡すことで、値が取得できます。 + + + + TLS で使う署名アルゴリズムを指定する定数として、 + CURLOPT_SSL_SIGNATURE_ALGORITHMS + が追加されました。 + + + + + + DOM + + + Dom\Element::$outerHTML が追加されました。 + + + + Dom\ParentNode の実装に、 + $children プロパティが追加されました。 + + + + + + EXIF + + + OffsetTime* Exif タグが追加されました。 + + + + HEIF/HEIC のサポートが追加されました。 + + + + + + Filter + + + フィルタ関数に渡すと、 + 検証に失敗した際に強制的に例外を発生させる + FILTER_THROW_ON_FAILURE フラグが追加されました。 + この新しいフラグは、 + FILTER_NULL_ON_FAILURE と組み合わせることはできません。 + 組み合わせようとすると、 + ValueError がスローされます。 + + + + + + + Intl + + + 様々な通貨関連の数値フォーマット向けに、 + クラス定数 NumberFormatter::CURRENCY_ISO, + NumberFormatter::CURRENCY_PLURAL, + NumberFormatter::CASH_CURRENCY, + NumberFormatter::CURRENCY_STANDARD が追加されました。 + + + + 指定されたロケールで likely tag を処理するために、 + Locale::addLikelySubtags と + Locale::minimizeSubtags が追加されました。 + + + + IntlListFormatter クラスが追加されました。 + これは、指定されたロケールで項目のリストをフォーマット、順序付け、 + 句読点を付ける操作を行うためのものです。 + クラス定数として、IntlListFormatter::TYPE_AND, + IntlListFormatter::TYPE_OR, + IntlListFormatter::TYPE_UNITS 演算子と、 + IntlListFormatter::WIDTH_WIDE, + IntlListFormatter::WIDTH_SHORT, + IntlListFormatter::WIDTH_NARROW があります。 + このクラスは ICU 67 以降でサポートされます。 + + + + + + PDO_Sqlite + + + クラス定数 + Pdo_Sqlite::ATTR_BUSY_STATEMENT が追加されました。 + + + + クラス定数 + Pdo_Sqlite::ATTR_EXPLAIN_STATEMENT, + Pdo_Sqlite::EXPLAIN_MODE_PREPARED, + Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN, + Pdo_Sqlite::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN が追加されました。 + + + + 接続する際の属性として、 + PDO\Sqlite::ATTR_TRANSACTION_MODE を追加しました。 + これに指定可能な値は、 + PDO\Sqlite::TRANSACTION_MODE_DEFERRED, + PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE, + PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE があります。 + これを使うと、beginTransaction() + 呼び出し時に使用するトランザクションモードを構成できます。 + + + + + + Session + + + session_set_cookie_params, + session_get_cookie_params, + session_start 関数は、 + "partitioned" というキー経由で、 + パーティショニングされた Cookie をサポートしました。 + + + + + + + SOAP + + + SoapClient::__getTypes が、 + 列挙型の case をダンプするようになりました。 + + + + Soap 1.2 の Reason テキスト向けに、xml:lang 属性のサポートが追加されました。 + + + + 上記のサポートによって、 + SoapFault::__construct と + SoapServer::fault のシグネチャに、 + オプションの $lang パラメータが追加されました。 + これによって、.NET SOAP クライアントとの互換性問題が解決します。 + + + + + + Standard + + + mail は、sendmail の実際のエラーを返すようになり、 + sendmail プロセスが予期せず終了したかどうかを検出するようになりました。 + 予期せず終了した場合、警告が発生し、この関数は &false; を返します。 + これより前のバージョンでは、こうしたエラーは黙って無視されていました。 + この変更は、sendmail を使ったメール送信にのみ影響します。 + + + + getimagesize が、HEIF/HEIC 画像をサポートしました。 + + + + libxml 拡張モジュールがロードされている場合に、 + getimagesize は SVG 画像もサポートするようになりました。 + 同様に、image_type_to_extension と + image_type_to_mime_type も、 + IMAGETYPE_SVG を処理するようになりました。 + + + + getimagesize が返す配列に、 + 2つエントリが追加されました: "width_unit" と + "height_unit" です。 + これらは、寸法がどの単位で表現されているかを示します。 + これらの単位は px がデフォルトですが、 + 必ずしも同じ単位であるとは限りません + (一例を挙げると、片方が cm で、もう片方が px である場合があります) + + + + setcookiesetrawcookie + 関数が、"partitioned" キーをサポートしました。 + + + + + + URI + + + RFC 3986 と WHATWG URL に従い、 + URI と URL を処理するのに使える拡張モジュールが追加されました。 + これは、常に有効になっています。 + + + + + + + XSL + + + XSLTProcessor::getParameter, + XSLTProcessor::setParameter, + XSLTProcessor::removeParameter の + $namespace 引数は、空でなくても動作するようになりました。 + 動作するのは、$name 引数が Clark 記法でなく、かつ + QName 形式でもない場合です。 + これらの場合は、名前空間が href または prefix からそれぞれ取得されるためです。 + + + + + + Zlib + + + flock が、zlib ストリームをサポートしました。 + これより前のバージョンでは、あらゆるロック操作を行う際に常に失敗していました。 + + + + + + diff --git a/appendices/migration85/new-functions.xml b/appendices/migration85/new-functions.xml new file mode 100644 index 0000000000..b7a4fc07d4 --- /dev/null +++ b/appendices/migration85/new-functions.xml @@ -0,0 +1,150 @@ + + + 新しく追加された関数 + + + PHP コア + + + + + get_error_handler + get_exception_handler + + Closure::getCurrent + + + + + + Curl + + + + curl_multi_get_handles + curl_share_init_persistent + + + + + DOM + + + Dom\Element::getElementsByClassName + + + Dom\Element::insertAdjacentHTML + + + + + + Enchant + + enchant_dict_remove_from_session + enchant_dict_remove + + + + + Intl + + + Locale::isRightToLeft + + locale_is_right_to_left + + grapheme_levenshtein + + + + + Opcache + + + opcache_is_script_cached_in_file_cache + + + + + PDO_SQLITE + + + Pdo\Sqlite::setAuthorizer + + + + + + PGSQL + + + pg_close_stmt + pg_service + + + + + Reflection + + + + ReflectionConstant::getFileName + + + ReflectionConstant::getExtension + + + ReflectionConstant::getExtensionName + + + + ReflectionConstant::getAttributes + + + ReflectionProperty::getMangledName + + + + + + Sqlite + + + + Sqlite3Stmt::busy + + + + + + Standard + + + + array_first + array_last + + + + + diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml new file mode 100644 index 0000000000..3e049d17a1 --- /dev/null +++ b/appendices/migration85/other-changes.xml @@ -0,0 +1,760 @@ + + + その他の変更 + + + PHP コア + + + Core + + + macOS における高精度なタイマー(hrtime) + は、mach_absolute_time() + ではなく、推奨されている + clock_gettime_nsec_np(CLOCK_UPTIME_RAW) + API を使うようになりました。 + + + + + + CGI/CLI + + + や、 + オプションは、 + 機能していないため削除されました。 + を代わりに使ってください。 + + + + + + PDO_ODBC + + + 大きなカラムのフェッチ動作が変更されました。 + 256 バイトのブロックをフェッチする代わりに、 + PDO_ODBC はより大きなブロックサイズをフェッチしようとするようになります。 + 現状このブロックサイズは、 + ページサイズから文字列オーバーヘッドを差し引いたサイズです。 + SQLGetData で SQL_NO_TOTAL を返すドライバも同様に、 + 適切に処理されるようになります。 + この変更で、互換性とパフォーマンスが改善するはずです。 + + + + + + + + + SAPI モジュールへの変更 + + + CLI + + + cli_set_process_title + に長過ぎるタイトルを設定しようとした場合、 + 黙ってタイトルを切り詰めるのではなく、 + 失敗するようになりました。 + + + + ビルトインのデフォルト値から変更されている INI + 設定を出力するオプションとして、 + オプションが追加されました。 + + + + + + FPM + + + httpd ProxyPass を経由した FPM は、 + オプションでスクリプトの完全なパスをデコードします。 + この新しい振る舞いは、 + 追加された fastcgi.script_path_encoded INI ディレクティブで抑止できます。 + + + + FPM のログの長さの上限は、 + log_limit の値を尊重するようになりました。 + + + + + + + + 変更された関数 + + + Intl + + + IntlDateFormatter::setTimeZone/datefmt_set_timezone + throws an IntlException on uninitialised + classes/clone failures. + + + + grapheme_extract properly assigns + $next value when skipping over invalid starting bytes. + Previously there were cases where it would point to the start of the + grapheme boundary instead of the end. + + + + Locale:: methods throw a + ValueError when locale inputs contain null bytes. + + + + transliterator_get_error_code, + transliterator_get_error_message, + TransLiterator::getErrorCode, + and TransLiterator::getErrorMessage + have dropped the false from the return type union. Returning &false; + was actually never possible. + + + + grapheme_strpos, + grapheme_stripos, + grapheme_strrpos, + grapheme_strripos, + grapheme_substr, + grapheme_strstr and + grapheme_stristr functions + add $locale parameter. + + + + + + + LDAP + + + ldap_get_option now accepts a NULL connection, + like ldap_set_option, to allow retrieval of global + options. + + + + + + libxml + + + libxml_set_external_entity_loader now has a formal + return type of true. + + + + + + OpenSSL + + + openssl_public_encrypt and + openssl_private_decrypt have a new parameter + $digest_algo that allows specifying the hash + digest algorithm for OAEP padding. + + + + openssl_sign and openssl_verify + have a new parameter $padding to allow using more + secure RSA PSS padding. + + + + openssl_cms_encrypt $cipher_algo + parameter can be a string with the cipher name. + That allows to use more algorithms including AES GCM cipher algorithms for + auth enveloped data. + + + + + + PCNTL + + + pcntl_exec now has a formal return type of + false. + + + + pcntl_waitid takes an additional resource_usage + argument to gather various platform specific metrics about the child process. + + + + + + PDO_PGSQL + + + PDO::pgsqlCopyFromArray now supports Iterable inputs. + + + + Pdo\Pgsql::setAttribute and + Pdo\Pgsql::prepare support setting + PDO::ATTR_PREFETCH to 0 which enters lazy fetch mode. + In this mode, statements cannot be run in parallel. + + + + + + PDO_SQLITE + + + SQLite PDO::quote will now throw an exception + or emit a warning, depending on the error mode, if the string contains + a null byte. + + + + PDO::sqliteCreateCollation will now throw an + exception if the callback has the wrong return type, making it more + in line with Pdo_Sqlite::createCollation behavior. + + + + + + PostgreSQL + + + pg_copy_from now supports Iterable inputs. + + + + pg_connect checks if the connection_string argument + contains any null byte. + + + + pg_close_stmt checks if the statement_name argument + contains any null byte. + + + + + + POSIX + + + posix_ttyname sets last_error to EBADF when encountering + an invalid file descriptor. + + + + posix_isatty raises an E_WARNING + message when encountering an invalid file descriptor. + + + + posix_fpathconf checks invalid file descriptors and + sets last_error to EBADF and raises an E_WARNING message. + + + + posix_kill throws a ValueError + when the process_id argument is lower or greater than what the platform + supports (signed integer or long range), posix_setpgid + throws a ValueError when the process_id or + the process_group_id is lower than zero or greater than what the platform + supports. + + + + posix_setrlimit throws a ValueError + when the hard_limit or soft_limit arguments are lower than -1 or + if soft_limit is greater than hard_limit. + + + + + + Reflection + + + The output of ReflectionClass::__toString for + enums has changed to better indicate that the class is an enum, and that + the enum cases are enum cases rather than normal class constants. + + + + The output of ReflectionProperty::__toString for + properties with hooks has changed to indicate what hooks the property has, + whether those hooks are final, and whether the property is virtual. + This also affects the output of ReflectionClass::__toString + when a class contains hooked properties. + + + + ReflectionAttribute::newInstance can now throw + errors for internal attributes if the attribute was applied on an invalid + target and the error was delayed from compile time to runtime via the + #[\DelayedTargetValidation] attribute. + + + + + + + Session + + + session_start is stricter in regard to the options + argument. It throws a ValueError if the array is + not a hashmap, or a TypeError if the read_and_close + value is not a valid type compatible with int. + + + + + + SNMP + + + snmpget, + snmpset, + snmp2_get, + snmp2_set, + snmp3_get, + snmp3_set + and SNMP::__construct throw a + ValueError when the hostname + is too large, contains any null byte or if the port is given + when negative or greater than 65535, timeout and retries values + are lower than -1 or too large. + + + + + + Sockets + + + socket_create_listen, + socket_bind and socket_sendto + throw a ValueError if the port is lower than 0 + or greater than 65535, and also if any of the hints array entries are + indexed numerically. + + + + socket_addrinfo_lookup throws a + TypeError if any of the hints values cannot be cast + to int and can throw a ValueError if any of these + values overflow. + + + + socket_set_option with + MCAST_LEAVE_GROUP/MCAST_LEAVE_SOURCE_GROUP + options will throw an exception if the value isn't a valid object or array. + + + + socket_create/socket_bind can + create AF_PACKET family sockets. + + + + socket_getsockname gets the interface index and its + string representation with AF_PACKET socket. + + + + socket_set_option with multicast context throws a + ValueError when the created socket is not of + AF_INET/AF_INET6 family. + + + + + + Tidy + + + tidy::__construct, + tidy::parseFile, + tidy::parseString now throws a + ValueError if the configuration contains an + invalid value or attempts to set a read-only internal entry, + and a TypeError if a configuration key is not a + string. + + + + + + Zlib + + + The "use_include_path" argument for the + gzfile, gzopen and + readgzfile functions has been changed + from int to boolean. + + + + gzfile, + gzopen and readgzfile functions + now respect the default stream context. + + + + + + + + 拡張モジュールへのその他の変更 + + + cURL + + + curl_setopt with + CURLOPT_FOLLOWLOCATION option's value + no longer is treated as boolean but integer to handle + CURLFOLLOW_OBEYCODE and + CURLFOLLOW_FIRSTONLY. + + + + + + Fileinfo + + + Upgraded file from 5.45 to 5.46. + + + + The return type of finfo_close has been changed to + true, rather than bool. + + + + + + Intl + + + Intl's internal error mechanism has been modernized so that it + indicates more accurately which call site caused what error. + Moreover, some ext/date exceptions have been wrapped inside a + IntlException now. + + + + + + Lexbor + + + An always enabled lexbor extension is added. It contains the lexbor + library that was separated from ext/dom + for being reused among other extensions. + The new extension is not directly exposed to userland. + + + + + + Opcache + + + The Opcache extension is now always + built into the PHP binary and is always loaded. + The INI directives opcache.enable + and opcache.enable_cli are + still honored. + + + + + + PCRE + + + Upgraded pcre2lib from 10.44 to 10.46. + + + + + + PDO_Sqlite + + + Increased minimum release version support from 3.7.7 to 3.7.17. + + + + + + Readline + + + The return types of readline_add_history, + readline_clear_history, + and readline_callback_handler_install have been + changed to true, rather than bool. + + + + + + Reflection + + + ReflectionConstant is no longer final. + + + + + + + + INI ファイルの扱いの変更 + + + Core + + + Added fatal_error_backtraces to control whether fatal errors should include + a backtrace. + + + + + Added startup-only max_memory_limit INI setting to control the maximum + memory_limit that may be configured at startup or runtime. Exceeding this + value emits a warning, unless set to -1, and sets memory_limit to the + current max_memory_limit instead. + + + + + + + Opcache + + + Added opcache.file_cache_read_only to support a read-only + opcache.file_cache directory, + for use with read-only file systems (e.g. read-only Docker containers). + Best used with opcache.validate_timestamps=0, + opcache.enable_file_override=1, + and opcache.file_cache_consistency_checks=0. + + + + + A cache generated with a different build of PHP, a different file + path, or different settings (including which extensions are loaded), may be + ignored. + + + + + The default value of + opcache.jit_hot_loop is + now 61 (a prime) to prevent it from being a multiple of loop iteration + counts. + It is recommended that this parameter is set to a prime number. + + + + Changing opcache.memory_consumption + when OPcache SHM is already set up will now correctly report a failure + instead of silently doing nothing and showing misleading values in PHPInfo. + + + + + + OpenSSL + + + Added openssl.libctx to select the OpenSSL library context type. Either + custom libctx for each thread can be used or a single global (default) + libctx is used. + + + + + + + + パフォーマンスに関わる変更 + + + Core + + + Remove OPcodes for identity comparisons against booleans, particularly + for the match(true) pattern. + + + + Add OPcode specialization for === [] and + !== [] comparisons. + + + + Creating exception objects is now much faster. + + + + The parts of the code that used SSE2 have been adapted to use SIMD + with ARM NEON as well. + + + + Introduced the TAILCALL VM, enabled by default when compiling with Clang>=19 + on x86_64 or aarch64. The TAILCALL VM is as fast as the HYBRID VM used when + compiling with GCC. This makes PHP binaries built with Clang>=19 as fast as + binaries built with GCC. The performance of the CALL VM, used with other + compilers, has also improved considerably. + + + + + + Intl + + + Now avoids creating extra string copies when converting strings + for use in the collator. + + + + + + MBString + + + The parts of the code that used SSE2 have been adapted to use SIMD + with ARM NEON as well. + + + + + + Opcache + + + Improved performance of fetching TLS variables in JIT'ed code in non-Glibc + builds. + + + + + + Reflection + + + Improved performance of the following methods: + + ReflectionProperty::getValue + ReflectionProperty::getRawValue + ReflectionProperty::isInitialized + ReflectionProperty::isInitialized + ReflectionProperty::setValue + ReflectionProperty::setRawValue + + + + + + + SPL + + + Improved performance of dimension accessors and methods of + SplFixedArray. + + + + + + Standard + + + Improved performance of array functions with callbacks + (array_find, array_filter, + array_map, usort, ...). + + + + Improved performance of urlencode and + rawurlencode. + + + + Improved unpack performance with nameless + repetitions by avoiding creating temporary strings and reparsing them. + + + + Improved pack performance. + + + + Minor improvements in array_chunk performance. + + + + + + XML + + + XMLReader + のプロパティのアクセス速度が向上しました。 + + + + XMLWriter + のパフォーマンスが改善し、メモリ消費量が減少しました。 + + + + + + + + diff --git a/appendices/migration85/windows-support.xml b/appendices/migration85/windows-support.xml new file mode 100644 index 0000000000..72781b7a8e --- /dev/null +++ b/appendices/migration85/windows-support.xml @@ -0,0 +1,103 @@ + + + Windows のサポート + + + Core + + + PHP_VERSION, + PHP_MINOR_VERSION, + PHP_RELEASE_VERSION の設定値は、常に数値になりました。 + これより前のバージョンでは、buildconf のビルド設定用の文字列でした。 + + + + phpize ビルドは、 + (in-tree ビルドで既に動作していたかのように) + build dir 内のソースツリーを反映するようになりました。 + 拡張モジュールによっては、 + (特に Makefile.frag.w32 を使う場合) + 調整が必要かもしれません。 + + + + MSVC ビルド向けに、 + + がサポートされるようになりました。 + これによって、ASan とデバッグのアサーションが有効になります。 + このオプションは MSVC 16.10 と Windows 10 以降でサポートされます。 + + + + clang ビルド向けの + + 設定オプションは、サポートされなくなりました。 + CFLAGS 経由で警告を抑制してください。 + + + + + + COM + + + この拡張モジュールは、 + デフォルトで共有ライブラリとしてビルドされるようになりました。 + これより前のバージョンでは、 + デフォルトで static な拡張モジュールとしてビルドされていましたが、 + 公式の Windows 用バイナリは、共有ライブラリとしてビルドされていました。 + + + + + + FFI + + + FFI::cdef と + FFI::load を使う際に、 + ライブラリを指定する必要はなくなりました。 + しかし実運用環境では、この便利機能を使うべきではありません。 + + + + + + Streams + + + パイプストリームが $read + 配列のみに存在し、かつ $write と + $except 配列が空の場合、 + stream_select は、 + POSIX システムと似た振る舞いをするようになりました。 + つまり、少なくとも1つのパイプが読み取り可能になった場合、 + またはタイムアウトした後にのみ、関数から戻ります。 + これより前のバージョンでは、この関数は直ちに返り、 + すべてのストリームが読み取り可能であると報告していました。 + + + + + + From db1177ad1ee78489c3ccf1ca36c2cd85dcbc26cc Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Tue, 21 Oct 2025 01:13:00 +0900 Subject: [PATCH 2/5] =?UTF-8?q?deprecated.xml=20=E3=81=AE=E7=BF=BB?= =?UTF-8?q?=E8=A8=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appendices/migration85/deprecated.xml | 333 +++++++++++++++----------- 1 file changed, 189 insertions(+), 144 deletions(-) diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml index 18b0a76d96..5ce85414b5 100644 --- a/appendices/migration85/deprecated.xml +++ b/appendices/migration85/deprecated.xml @@ -1,171 +1,185 @@ - Deprecated Features + PHP 8.5.x で推奨されなくなる機能 - PHP Core + PHP コア - Changes to user output handler + ユーザー定義の出力ハンドラに関する変更 - Returning a non-string from a user output handler is deprecated. The - deprecation warning will bypass the handler with the bad return to ensure - it is visible; if there are nested output handlers the next one will still - be used. + ユーザー定義の出力ハンドラから文字列でない値を返すことは、 + 推奨されなくなりました。 + この推奨されない警告が表示されることを保証するため、 + 不正な戻り値を持つハンドラはバイパスされます。 + つまり、ネストされた出力ハンドラが存在する場合、 + 次のハンドラは引き続き使われるということです。 - Trying to produce output (e.g. with echo) within - a user output handler is deprecated. - The deprecation warning will bypass the handler producing the output to - ensure it is visible; if there are nested output handlers the next - one will still be used. If a user output handler returns a non-string and - produces output, the warning about producing an output is emitted first. + ユーザー定義の出力ハンドラから(たとえば echo + などを使って) 出力を行うことは、推奨されなくなりました。 + この推奨されない警告は、 + 出力を生成するハンドラをバイパスして、 + それが確実に表示されるようにします。 + つまり、ネストされた出力ハンドラが存在する場合、 + 次のハンドラは引き続き使われるということです。 + ユーザー定義の出力ハンドラが文字列でない値を返し、 + かつ出力を生成する場合、出力を行ったことに関する警告が最初に発生します。 - Non-canonical cast names + 正規化されていない型名でのキャスト - Non-canonical cast names (boolean), - (integer), (double), - and (binary) have been deprecated, - use (bool), (int), - (float), and (string) respectively. + 正規化されていない型名 + (boolean), + (integer), + (double), + (binary) でキャストすることは、 + 推奨されなくなりました。 + (bool), (int), + (float), (string) + をそれぞれ使ってください。 - Terminating case statements with a semicolon + セミコロンでcase文を終了させる - Terminating case statements with a semicolon instead of a colon has - been deprecated. + case文をコロンではなく、セミコロンで終了させることは、 + 推奨されなくなりました。 - The backtick operator + バッククォート演算子 - The backtick operator - as an alias for shell_exec has been deprecated. + shell_exec + の別名として使われている + バッククォート演算子 + は、推奨されなくなりました。 - Returning null from __debugInfo() + __debugInfo() から null を返す - Returning &null; from __debugInfo() - has been deprecated. Return an empty array instead. + から &null; を返すことは、推奨されなくなりました。 + 空の配列を返してください。 - report_memleaks INI directive + report_memleaks INI ディレクティブ - The report_memleaks INI directive - has been deprecated. + INI ディレクティブ + report_memleaks は、 + 推奨されなくなりました。 - Constant redeclaration + 定数の再宣言 - Constant redeclaration has been deprecated. + 同じ定数を再宣言することは、推奨されなくなりました。 - Closure binding issues + クロージャのバインド時の問題 - The following closure binding issues, which already emit an - E_WARNING, are now deprecated: + 既に E_WARNING が発生している、 + クロージャのバインド時の以下の問題は、推奨されなくなりました: - Binding an instance to a static closure. - Binding methods to objects that are not instances of the class - (or subclass) that the method is defined. - Unbinding $this from a method. - Unbinding $this from a closure that uses `$this`. - Binding a closure to the scope of an internal class. - Rebinding the scope of a closure created from a function or method. + インスタンスを static なクロージャにバインドすること + メソッドが定義されているクラス(またはサブクラス)のインスタンスでないオブジェクトに、メソッドをバインドすること + メソッドから $this のバインドを解除すること + `$this` を使っているクロージャから、$this のバインドを解除すること + 内部クラスのスコープにクロージャをバインドすること + 関数やメソッドから生成したクロージャのスコープを、再度バインドすること - __sleep() and __wakeup() magic methods + マジックメソッド __sleep() と __wakeup() - The __sleep() and - __wakeup() magic methods - have been soft-deprecated. - The __serialize() and - __unserialize() magic - methods should be used instead, or at the same time if compatibility - with PHP 7 is required. + マジックメソッド __sleep() と + __wakeup() は、 + soft-deprecated 扱いになりました。 + 代わりに、__serialize() と + __unserialize() を使ってください。 + PHP 7 との互換性が必要な場合は、両方を同時に使ってください。 - Using null as an array offset + 配列のオフセットに null を指定 - Using null as an array offset or when calling array_key_exists - is now deprecated. Instead an empty string should be used. + 配列のオフセットに &null; を指定したり、 + array_key_exists をコールする際に &null; を指定することは、 + 推奨されなくなりました。 + 代わりに、空文字列を使ってください。 - Incrementing non-numeric strings + 数値でない文字列をインクリメント - Incrementing non-numeric strings is now deprecated. - Instead the str_increment function should be used. + 数値でない文字列をインクリメントすることは、推奨されなくなりました。 + str_increment を代わりに使ってください。 - register_argc_argv INI directive + register_argc_argv INI ディレクティブ - Deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string for - non-CLI SAPIs has been deprecated. - Configure register_argc_argv=0 and switch to either $_GET or - $_SERVER['QUERY_STRING'] to access the information, after verifying - that the usage is safe. + CLI でない SAPI において、 + クエリ文字列から $_SERVER['argc'] と + $_SERVER['argv'] の値を取得する機能は、 + 推奨されなくなりました。 + 安全な使い方を検証した上で register_argc_argv=0 + を設定し、情報を取得する手段を $_GET や + $_SERVER['QUERY_STRING'] に切り替えてください。 @@ -176,14 +190,16 @@ cURL - The curl_close function has been deprecated, - as CurlHandle objects are freed automatically. + curl_close 関数は、推奨されなくなりました。 + CurlHandle オブジェクトが、 + 自動でリソースを開放するためです。 - The curl_share_close function has been deprecated, - as CurlShareHandle objects are freed automatically. + curl_share_close 関数は、推奨されなくなりました。 + CurlShareHandle オブジェクトが、 + 自動でリソースを開放するためです。 @@ -193,19 +209,25 @@ Date - The DATE_RFC7231 and - DateTimeInterface::RFC7231 constants have been deprecated. - This is because the associated timezone is ignored and always uses GMT. + 定数 DATE_RFC7231 と + DateTimeInterface::RFC7231 + は、推奨されなくなりました。 + これらに関連付けられているタイムゾーンは無視され、 + 常に GMT を使っているためです。 - The __wakeup() magic method of DateTimeInterface, - DateTime, DateTimeImmutable, - DateTimeZone, DateInterval, - and DatePeriod has been deprecated in favour of - the __unserialize() magic method. + DateTime, + DateTimeImmutable, + DateTimeZone, + DateInterval, + DatePeriod のマジックメソッド + __wakeup() + は、推奨されなくなりました。 + マジックメソッド __unserialize() + を使うのが好ましいです。 @@ -215,15 +237,16 @@ FileInfo - The finfo_close function has been deprecated. - As finfo objects are freed automatically. + finfo_close 関数は、推奨されなくなりました。 + finfo オブジェクトが、 + 自動でリソースを開放するためです。 - The $context parameter of the - finfo_buffer function has been deprecated - as it is ignored. + finfo_buffer 関数の $context + パラメータは、推奨されなくなりました。 + このパラメータは無視されているためです。 @@ -233,8 +256,9 @@ GD - The imagedestroy function has been deprecated, - as GdImage objects are freed automatically. + imagedestroy 関数は、推奨されなくなりました。 + GdImage オブジェクトが、 + 自動でリソースを開放するためです。 @@ -244,9 +268,10 @@ Hash - The MHASH_* constants - have been deprecated. These have been overlooked when the mhash*() function - family has been deprecated per + MHASH_* 定数は、 + 推奨されなくなりました。 + mhash*() 関数が推奨されなくなった際に、 + これらの定数は見逃されていました。 @@ -256,11 +281,13 @@ Intl - The intl.error_level INI setting - has been deprecated. - Errors should either be checked manually or exceptions should be enabled by - using the intl.use_exceptions - INI setting. + INI ディレクティブ + intl.error_level は、 + 推奨されなくなりました。 + エラーは手動でチェックするか、 + INI ディレクティブ + intl.use_exceptions + を使って例外を有効にすべきです。 @@ -270,15 +297,16 @@ LDAP - Specific Oracle Instant Client calls and constants have been deprecated. + 特定の Oracle Instant Client の呼び出しや定数は、 + 推奨されなくなりました。 - List of affected calls: + 影響を受ける呼び出しは以下の通りです: - ldap_connect with wallet support + wallet のサポートを使った ldap_connect ldap_connect_wallet - List of affected constants: + 影響を受ける定数は以下の通りです: GSLC_SSL_NO_UATH GSLC_SSL_ONEWAY_UATH @@ -293,8 +321,10 @@ MySQLi - The mysqli_execute alias function has been deprecated. - Use mysqli_stmt_execute instead. + エイリアスとして定義されている + mysqli_execute 関数は、 + 推奨されなくなりました。 + 代わりに mysqli_stmt_execute を使いましょう。 @@ -304,10 +334,10 @@ OpenSSL - The $key_length parameter for - openssl_pkey_derive has been deprecated. - This is because it is either ignored, or truncates the key, which can be - a vulnerability. + openssl_pkey_derive$key_length + パラメータは、推奨されなくなりました。 + このパラメータは無視されているか、キーを切り捨てるかしており、 + それらの挙動が脆弱性になりうるためです。 @@ -317,14 +347,14 @@ PDO - The "uri:" DSN scheme has been deprecated due to security concerns with - DSNs coming from remote URIs. + "uri:" DSN スキームは、推奨されなくなりました。 + リモートURI から生じる、DSN に関するセキュリティ上の懸念があるためです。 - Driver specific constants in the PDO class have been deprecated. - List of affected constants and their replacement: + PDO クラスのドライバ特有の定数は、推奨されなくなりました。 + 影響を受ける定数と、代替は以下のとおりです: PDO::DBLIB_ATTR_CONNECTION_TIMEOUT => Pdo\Dblib::ATTR_CONNECTION_TIMEOUT @@ -374,8 +404,8 @@ - Driver specific methods in the PDO class have been deprecated. - List of affected methods and their replacement: + PDO クラスのドライバ特有のメソッドは、推奨されなくなりました。 + 影響を受けるメソッドと、代替は以下のとおりです: PDO::pgsqlCopyFromArray => Pdo\Pgsql::copyFromArray @@ -400,7 +430,7 @@ PDO_PGSQL - Constants related to transaction states have been deprecated: + トランザクションの状態に関連する以下の定数は、推奨されなくなりました: PDO::PGSQL_TRANSACTION_IDLE @@ -418,20 +448,23 @@ Reflection - The setAccessible() methods of various Reflection objects have been - deprecated, as those no longer have an effect. - + リフレクション関連の様々な setAccessible() メソッドは、 + 推奨されなくなりました。 + 使っても効果がないためです。 + - Calling ReflectionClass::getConstant for constants - that do not exist has been deprecated. + 存在しない定数に対して、 + ReflectionClass::getConstant + をコールすることは、推奨されなくなりました。 - Calling ReflectionProperty::getDefaultValue for - properties without default values has been deprecated. + デフォルト値が存在しないプロパティに対して、 + ReflectionProperty::getDefaultValue + をコールすることは、推奨されなくなりました。 @@ -441,28 +474,34 @@ SPL - Unregistering all autoloaders by passing the - spl_autoload_call function as a callback argument to - spl_autoload_unregister has been deprecated. - Instead if this is needed, one should iterate over the return value of - spl_autoload_functions and call - spl_autoload_unregister on each value. + spl_autoload_call を + spl_autoload_unregister + のコールバック引数に渡すことで、 + すべての autoload の登録を解除することは、推奨されなくなりました。 + 代わりに、spl_autoload_functions + の戻り値を反復処理し、 + それぞれの値に対して spl_autoload_unregister + をコールする必要があります。 - The SplObjectStorage::contains, - SplObjectStorage::attach, and - SplObjectStorage::detach methods have been deprecated - in favour of SplObjectStorage::offsetExists, - SplObjectStorage::offsetSet, and - SplObjectStorage::offsetUnset respectively. + SplObjectStorage::contains, + SplObjectStorage::attach, + SplObjectStorage::detach + は、推奨されなくなりました。 + SplObjectStorage::offsetExists, + SplObjectStorage::offsetSet, + SplObjectStorage::offsetUnset + をそれぞれ使ってください。 - Using ArrayObject and - ArrayIterator with objects has been deprecated. + オブジェクトと一緒に + ArrayObject と + ArrayIterator を使うことは、 + 推奨されなくなりました。 @@ -472,37 +511,42 @@ Standard - The socket_set_timeout alias function has been deprecated. - Use stream_set_timeout instead. + エイリアスとして定義されている + socket_set_timeout 関数は、 + 推奨されなくなりました。 + 代わりに stream_set_timeout を使いましょう。 - Passing &null; to to readdir, - rewinddir, and closedir - to use the last opened directory has been deprecated. - Provide the last opened directory explicitly instead. + 最後にオープンしたディレクトリを使う目的で、 + readdir, + rewinddir, + closedir に &null; を渡すことは、 + 推奨されなくなりました。 + 最後にオープンしたディレクトリを明示的に指定してください。 - Passing integers outside the interval [0, 255] to chr - is now deprecated. - This is because a byte can only hold a value within this interval. + chr に、 + 区間 [0, 255] の範囲にない数値を指定することは、推奨されなくなりました。 + 1バイトのデータは、この範囲でのみ保持できるからです。 - Passing a string which is not a single byte to ord - is now deprecated, this is indicative of a bug. + シングルバイトでない文字列を ord に渡すことは、 + 推奨されなくなりました。 + こうすることは、バグであることを示唆しています。 - The locally predefined variable + ローカルで事前に定義済みの変数 $http_response_header - is deprecated. Instead one should call the - http_get_last_response_headers function. + は、推奨されなくなりました。代わりに、 + http_get_last_response_headers をコールすべきです。 @@ -512,8 +556,9 @@ XML - The xml_parser_free function has been deprecated, - as XMLParser objects are freed automatically. + xml_parser_free 関数は、推奨されなくなりました。 + XMLParser オブジェクトが、 + 自動でリソースを開放するためです。 From 876205893cb61b3c038b26d6d153120fe73d92d4 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Wed, 22 Oct 2025 01:34:37 +0900 Subject: [PATCH 3/5] =?UTF-8?q?other-changes.xml=20=E3=81=AE=E7=BF=BB?= =?UTF-8?q?=E8=A8=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appendices/migration85/deprecated.xml | 2 +- appendices/migration85/other-changes.xml | 461 +++++++++++++---------- 2 files changed, 259 insertions(+), 204 deletions(-) diff --git a/appendices/migration85/deprecated.xml b/appendices/migration85/deprecated.xml index 5ce85414b5..2feb2b01c2 100644 --- a/appendices/migration85/deprecated.xml +++ b/appendices/migration85/deprecated.xml @@ -67,7 +67,7 @@ shell_exec - の別名として使われている + のエイリアスとして使われている バッククォート演算子 は、推奨されなくなりました。 diff --git a/appendices/migration85/other-changes.xml b/appendices/migration85/other-changes.xml index 3e049d17a1..41f0f0c1bb 100644 --- a/appendices/migration85/other-changes.xml +++ b/appendices/migration85/other-changes.xml @@ -96,30 +96,33 @@ Intl - IntlDateFormatter::setTimeZone/datefmt_set_timezone - throws an IntlException on uninitialised - classes/clone failures. + クラスが初期化されていなかったり、 + clone が失敗した場合に、 + IntlDateFormatter::setTimeZone/datefmt_set_timezoneIntlException + をスローするようになりました。 - grapheme_extract properly assigns - $next value when skipping over invalid starting bytes. - Previously there were cases where it would point to the start of the - grapheme boundary instead of the end. + grapheme_extract は、 + 無効な開始バイトをスキップする際に $next + の値を適切に割り当てるようになりました。 + これより前のバージョンでは、grapheme 境界の終端ではなく、 + 先頭を指すケースがありました。 - Locale:: methods throw a - ValueError when locale inputs contain null bytes. + Locale クラスのメソッドは、 + ロケールの入力に null バイトが含まれていた場合に + ValueError をスローするようになりました。 transliterator_get_error_code, transliterator_get_error_message, TransLiterator::getErrorCode, - and TransLiterator::getErrorMessage - have dropped the false from the return type union. Returning &false; - was actually never possible. + TransLiterator::getErrorMessage の戻り値の + union 型から false を削除しました。 + &false; を返すことは実際には起こり得なかったからです。 @@ -128,9 +131,9 @@ grapheme_strrpos, grapheme_strripos, grapheme_substr, - grapheme_strstr and - grapheme_stristr functions - add $locale parameter. + grapheme_strstr, + grapheme_stristr + 関数に $locale パラメータを追加しました。 @@ -140,9 +143,10 @@ LDAP - ldap_get_option now accepts a NULL connection, - like ldap_set_option, to allow retrieval of global - options. + ldap_get_option は、 + ldap_set_option と同様に、 + NULL の接続を受け付けるようになりました。 + これは、グローバルオプションを取得できるようにするためです。 @@ -151,8 +155,8 @@ libxml - libxml_set_external_entity_loader now has a formal - return type of true. + libxml_set_external_entity_loader は、 + 戻り値の型を正式に true としました。 @@ -161,23 +165,26 @@ OpenSSL - openssl_public_encrypt and - openssl_private_decrypt have a new parameter - $digest_algo that allows specifying the hash - digest algorithm for OAEP padding. + openssl_public_encrypt と + openssl_private_decrypt は、 + OAEP パディング向けのハッシュダイジェストアルゴリズムを指定するために、 + 新しく $digest_algo + パラメータを設定できるようになりました。 - openssl_sign and openssl_verify - have a new parameter $padding to allow using more - secure RSA PSS padding. + openssl_sign と + openssl_verify は、 + よりセキュアな RSA PSS パディングを使えるようにするために、 + 新しく $padding + パラメータを設定できるようになりました。 - openssl_cms_encrypt $cipher_algo - parameter can be a string with the cipher name. - That allows to use more algorithms including AES GCM cipher algorithms for - auth enveloped data. + openssl_cms_encrypt$cipher_algo + パラメーターに、暗号名を示す文字列を指定できるようになりました。 + これによって、認証付きのエンベロープデータ向けに、 + AES GCM 暗号アルゴリズムを含むより多くのアルゴリズムを使えるようになります。 @@ -186,13 +193,14 @@ PCNTL - pcntl_exec now has a formal return type of - false. + pcntl_exec は、 + 戻り値の型を正式に false としました。 - pcntl_waitid takes an additional resource_usage - argument to gather various platform specific metrics about the child process. + pcntl_waitid は、 + 子プロセスに関する様々なプラットフォーム固有のメトリクスを収集するため、 + 追加で resource_usage 引数を受け取るようになりました。 @@ -201,14 +209,16 @@ PDO_PGSQL - PDO::pgsqlCopyFromArray now supports Iterable inputs. + PDO::pgsqlCopyFromArray は、 + Iterable の入力をサポートするようになりました。 - Pdo\Pgsql::setAttribute and - Pdo\Pgsql::prepare support setting - PDO::ATTR_PREFETCH to 0 which enters lazy fetch mode. - In this mode, statements cannot be run in parallel. + Pdo\Pgsql::setAttribute と + Pdo\Pgsql::prepare は、 + lazy フェッチモードに入ることを示すために、 + PDO::ATTR_PREFETCH に 0 を設定できるようになりました。 + このモードの場合、Statement は並列に実行できません。 @@ -217,15 +227,18 @@ PDO_SQLITE - SQLite PDO::quote will now throw an exception - or emit a warning, depending on the error mode, if the string contains - a null byte. + SQLite の PDO::quote は、 + 文字列に null バイトが含まれていた場合に、 + エラーモードに応じて警告を発生させたり、例外をスローするようになりました。 - PDO::sqliteCreateCollation will now throw an - exception if the callback has the wrong return type, making it more - in line with Pdo_Sqlite::createCollation behavior. + PDO::sqliteCreateCollation は、 + コールバック関数の戻り値の型が間違っている場合に、 + 例外をスローするようになりました。 + この変更によって、 + Pdo_Sqlite::createCollation + の動作とより一致するようになります。 @@ -234,17 +247,20 @@ PostgreSQL - pg_copy_from now supports Iterable inputs. + pg_copy_from は、 + Iterable の入力をサポートするようになりました。 - pg_connect checks if the connection_string argument - contains any null byte. + pg_connect は、 + connection_string 引数に null + バイトが含まれているかをチェックするようになりました。 - pg_close_stmt checks if the statement_name argument - contains any null byte. + pg_close_stmt は、 + statement_name 引数に null + バイトが含まれているかをチェックするようになりました。 @@ -253,33 +269,41 @@ POSIX - posix_ttyname sets last_error to EBADF when encountering - an invalid file descriptor. + posix_ttyname は、 + ファイルディスクリプタが無効な場合に、 + last_error に EBADF を設定するようになりました。 - posix_isatty raises an E_WARNING - message when encountering an invalid file descriptor. + posix_isatty は、 + ファイルディスクリプタが無効な場合に、 + E_WARNING を発生させるようになりました。 - posix_fpathconf checks invalid file descriptors and - sets last_error to EBADF and raises an E_WARNING message. + posix_fpathconf は、 + ファイルディスクリプタが無効かどうかをチェックし、 + 無効な場合に last_error に EBADF を設定しつつ、 + E_WARNING を発生させるようになりました。 - posix_kill throws a ValueError - when the process_id argument is lower or greater than what the platform - supports (signed integer or long range), posix_setpgid - throws a ValueError when the process_id or - the process_group_id is lower than zero or greater than what the platform - supports. + posix_kill は、 + process_id 引数がプラットフォームがサポートする範囲 + (符号付きまたは long)より小さいか大きい場合に + ValueError をスローします。 + + posix_setpgid は、 + process_id または process_group_id が 0 未満、 + またはプラットフォームがサポートする範囲より大きい場合に + ValueError をスローします。 - posix_setrlimit throws a ValueError - when the hard_limit or soft_limit arguments are lower than -1 or - if soft_limit is greater than hard_limit. + posix_setrlimit は、 + hard_limit または soft_limit 引数が -1 より小さい場合、 + または soft_limit が hard_limit より大きい場合に + ValueError をスローします。 @@ -288,24 +312,28 @@ Reflection - The output of ReflectionClass::__toString for - enums has changed to better indicate that the class is an enum, and that - the enum cases are enum cases rather than normal class constants. + ReflectionClass::__toString + の列挙型の出力について、 + クラスが列挙型であることをより明確に示すように変更されました。 + また、列挙型の case は通常のクラス定数ではなく、 + 列挙型の case であることを示すようになりました。 - The output of ReflectionProperty::__toString for - properties with hooks has changed to indicate what hooks the property has, - whether those hooks are final, and whether the property is virtual. - This also affects the output of ReflectionClass::__toString - when a class contains hooked properties. + ReflectionProperty::__toString の、 + フックを持つプロパティの出力は、プロパティがどのフックを持つか、 + それらのフックが final かどうか、 + およびプロパティが仮想かどうかを示すように変更されました。 + これは、クラスがフックされたプロパティを含む場合の + ReflectionClass::__toStringの出力にも影響します。 - ReflectionAttribute::newInstance can now throw - errors for internal attributes if the attribute was applied on an invalid - target and the error was delayed from compile time to runtime via the - #[\DelayedTargetValidation] attribute. + 無効なターゲットにアトリビュートが適用された場合、 + ReflectionAttribute::newInstance は、 + 内部的なアトリビュート向けに例外をスローするようになりました。 + #[\DelayedTargetValidation] を使うと、 + 発生するエラーがコンパイル時から実行時に遅延されます。 @@ -315,10 +343,12 @@ Session - session_start is stricter in regard to the options - argument. It throws a ValueError if the array is - not a hashmap, or a TypeError if the read_and_close - value is not a valid type compatible with int. + session_start は、 + オプション引数をより厳格に扱うようになっています。 + 配列が連想配列でない場合、 + ValueError がスローされます。 + read_and_close の値が int と互換性のない値の場合、 + TypeError がスローされます。 @@ -333,11 +363,12 @@ snmp2_set, snmp3_get, snmp3_set - and SNMP::__construct throw a - ValueError when the hostname - is too large, contains any null byte or if the port is given - when negative or greater than 65535, timeout and retries values - are lower than -1 or too large. + SNMP::__construct は、 + ValueError をスローするようになりました。 + スローされるのは、ホスト名が長すぎたり、 + ホスト名が null バイトを含んでいたり、 + 負の値や 65535 を超えるポート番号を指定したり、 + タイムアウトやリトライの値が -1 より小さかったり、大きすぎたりする場合です。 @@ -347,39 +378,45 @@ socket_create_listen, - socket_bind and socket_sendto - throw a ValueError if the port is lower than 0 - or greater than 65535, and also if any of the hints array entries are - indexed numerically. + socket_bind, + socket_sendto は、 + ポートが 0 未満または 65535 を超える場合、 + または hints 配列のエントリが数値インデックスの場合に、 + ValueError をスローします。 - socket_addrinfo_lookup throws a - TypeError if any of the hints values cannot be cast - to int and can throw a ValueError if any of these - values overflow. + socket_addrinfo_lookup は、 + hints 値のいずれかが int 型にキャストできない場合に、 + TypeError をスローします。 + また、これらの値のいずれかがオーバーフローした場合、 + ValueError をスローする可能性があります。 - socket_set_option with - MCAST_LEAVE_GROUP/MCAST_LEAVE_SOURCE_GROUP - options will throw an exception if the value isn't a valid object or array. + socket_set_option 関数で + MCAST_LEAVE_GROUP/MCAST_LEAVE_SOURCE_GROUP を指定した場合、 + 値が有効なオブジェクトまたは配列でない場合は例外がスローされます。 - socket_create/socket_bind can - create AF_PACKET family sockets. + socket_create/socket_bind は、 + AF_PACKET + ファミリのソケットを作成できるようになりました。 - socket_getsockname gets the interface index and its - string representation with AF_PACKET socket. + socket_getsockname は、 + AF_PACKET ソケットを指定すると、 + インターフェイスのインデックスとその文字列表現を取得します。 - socket_set_option with multicast context throws a - ValueError when the created socket is not of - AF_INET/AF_INET6 family. + socket_set_option + をマルチキャストコンテキストで呼び出す場合、 + 作成されたソケットが + AF_INET/AF_INET6 + ファミリでない場合、ValueError がスローされます。 @@ -390,11 +427,12 @@ tidy::__construct, tidy::parseFile, - tidy::parseString now throws a - ValueError if the configuration contains an - invalid value or attempts to set a read-only internal entry, - and a TypeError if a configuration key is not a - string. + tidy::parseString は、 + 無効な設定値が含まれていたり、 + 読み取り専用の内部エントリを設定しようとした場合に + ValueError をスローするようになりました。 + 設定キーが文字列でない場合は、 + TypeError がスローされるようになっています。 @@ -403,16 +441,17 @@ Zlib - The "use_include_path" argument for the - gzfile, gzopen and - readgzfile functions has been changed - from int to boolean. + gzfile, gzopen, + readgzfile 関数の + "use_include_path" 引数の型が、 + int から boolean に変更されました。 gzfile, - gzopen and readgzfile functions - now respect the default stream context. + gzopen, + readgzfile 関数は、 + デフォルトのストリームコンテキストを尊重するようになりました。 @@ -426,11 +465,11 @@ cURL - curl_setopt with - CURLOPT_FOLLOWLOCATION option's value - no longer is treated as boolean but integer to handle - CURLFOLLOW_OBEYCODE and - CURLFOLLOW_FIRSTONLY. + curl_setopt に指定する + CURLOPT_FOLLOWLOCATION オプションの値が、 + boolean ではなく数値として扱われるようになりました。 + これは CURLFOLLOW_OBEYCODE と + CURLFOLLOW_FIRSTONLY を処理するためです。 @@ -439,12 +478,12 @@ Fileinfo - Upgraded file from 5.45 to 5.46. + file の magic データベースが、5.45 から 5.46 に更新されました。 - The return type of finfo_close has been changed to - true, rather than bool. + finfo_close の戻り値の型が、 + bool ではなく、true に変更されました。 @@ -453,10 +492,11 @@ Intl - Intl's internal error mechanism has been modernized so that it - indicates more accurately which call site caused what error. - Moreover, some ext/date exceptions have been wrapped inside a - IntlException now. + Intl の内部エラー処理機構がモダンになり、 + どの呼び出しがどのエラーを引き起こしたかを、 + より正確に示せるようになりました。 + さらに、一部の ext/date の例外は、 + IntlException でラップされるようになっています。 @@ -465,10 +505,12 @@ Lexbor - An always enabled lexbor extension is added. It contains the lexbor - library that was separated from ext/dom - for being reused among other extensions. - The new extension is not directly exposed to userland. + lexbor 拡張モジュールが追加されました。 + これは常に有効になっています。 + 他の拡張モジュールで再利用できるようにするため、 + ext/dom + から分離された laxbor ライブラリが含まれています。 + この新しい拡張機能は、ユーザーランドに直接公開されません。 @@ -477,11 +519,11 @@ Opcache - The Opcache extension is now always - built into the PHP binary and is always loaded. - The INI directives opcache.enable - and opcache.enable_cli are - still honored. + Opcache 拡張モジュール は、 + 常に PHP バイナリに組み込まれ、ロードされるようになりました。 + opcache.enable と + opcache.enable_cli + の設定はまだ有効です。 @@ -490,7 +532,7 @@ PCRE - Upgraded pcre2lib from 10.44 to 10.46. + pcre2lib が、10.44 から 10.46 に更新されました。 @@ -499,7 +541,8 @@ PDO_Sqlite - Increased minimum release version support from 3.7.7 to 3.7.17. + サポートされる最低リリースバージョンが、 + 3.7.7 から 3.7.17 に変更されました。 @@ -508,10 +551,11 @@ Readline - The return types of readline_add_history, + readline_add_history, readline_clear_history, - and readline_callback_handler_install have been - changed to true, rather than bool. + readline_callback_handler_install + の戻り値の型が、 + bool から true に変更されました。 @@ -520,7 +564,8 @@ Reflection - ReflectionConstant is no longer final. + ReflectionConstant クラスは、 + final ではなくなりました。 @@ -531,19 +576,19 @@ INI ファイルの扱いの変更 - Core + PHP コア - Added fatal_error_backtraces to control whether fatal errors should include - a backtrace. + 致命的なエラーにバックトレースを含めるかどうかを制御するために、 + fatal_error_backtraces INI ディレクティブが追加されました。 - 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. + 起動時にのみ有効な、max_memory_limit INI ディレクティブが追加されました。 + これは、起動時または実行時に設定可能な memory_limit の最大値を制御するためのものです。 + この値を超えると、-1 を設定しない限り警告が発生します。 + 代わりに、memory_limit の値が、現在の max_memory_limit の値に設定されます。 @@ -553,35 +598,39 @@ Opcache - Added opcache.file_cache_read_only to support a read-only - opcache.file_cache directory, - for use with read-only file systems (e.g. read-only Docker containers). - Best used with opcache.validate_timestamps=0, + opcache.file_cache + で指定されたディレクトリがが読み取り専用だった場合をサポートするために、 + opcache.file_cache_read_only が追加されました。 + これは、読み取り専用ファイルシステム(例:読み取り専用 Docker コンテナ)向けです。 + opcache.validate_timestamps=0, opcache.enable_file_override=1, - and opcache.file_cache_consistency_checks=0. + opcache.file_cache_consistency_checks=0 + の組み合わせで使うことを推奨します。 - A cache generated with a different build of PHP, a different file - path, or different settings (including which extensions are loaded), may be - ignored. + 異なるビルドのPHP、 + 異なるファイルパス、 + 異なる設定(ロードされる拡張機能を含む)で生成されたキャッシュは、 + 無視される可能性があります。 - The default value of - opcache.jit_hot_loop is - now 61 (a prime) to prevent it from being a multiple of loop iteration - counts. - It is recommended that this parameter is set to a prime number. + opcache.jit_hot_loop + のデフォルト値は、ループ反復回数の倍数にならないように、 + 61 (素数) に設定されました。 + このパラメータには、素数の値を設定することを推奨します。 - Changing opcache.memory_consumption - when OPcache SHM is already set up will now correctly report a failure - instead of silently doing nothing and showing misleading values in PHPInfo. + の値を変更した場合に、正しく失敗を報告するようになりました。 + これより前のバージョンでは、黙って何もせず、 + PHPInfo で誤解を招く値を表示していました。 @@ -590,9 +639,10 @@ OpenSSL - Added openssl.libctx to select the OpenSSL library context type. Either - custom libctx for each thread can be used or a single global (default) - libctx is used. + OpenSSL のライブラリコンテキストタイプを選択できるようにするため、 + openssl.libctx INI ディレクティブを追加しました。 + スレッドごとにカスタムの libctx を使うか、 + グローバルな、単一の libctx (デフォルト)を使えます。 @@ -603,33 +653,37 @@ パフォーマンスに関わる変更 - Core + PHP コア - Remove OPcodes for identity comparisons against booleans, particularly - for the match(true) pattern. + match(true) パターン向けに、 + boolean 値との同一性の比較に関する OPcode が削除されました。 - Add OPcode specialization for === [] and - !== [] comparisons. + === [] と + !== [] による比較について、 + OPcode の特殊化処理が追加されました。 - Creating exception objects is now much faster. + 例外オブジェクトを生成する速度が向上しました。 - The parts of the code that used SSE2 have been adapted to use SIMD - with ARM NEON as well. + SSE2 を使用していたコードは、 + ARM NEON による SIMD 命令も使うように調整されました。 - 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. + x86_64 または aarch64 アーキテクチャで Clang>=19 + を使用してコンパイルする場合、 + デフォルトで有効となる TAILCALL VM を導入しました。 + TAILCALL VM は、 + GCC コンパイル時に使用される HYBRID VM と同等の速度を実現します。 + これにより、Clang>=19 でビルドされた PHP バイナリは、 + GCC でビルドされたバイナリと同等の速度を発揮します。 + 他のコンパイラで使用される CALL VM のパフォーマンスも大幅に改善されました。 @@ -638,8 +692,7 @@ Intl - Now avoids creating extra string copies when converting strings - for use in the collator. + collator で文字列変換を行う際、余計な文字列コピーをしなくなりました。 @@ -648,8 +701,8 @@ MBString - The parts of the code that used SSE2 have been adapted to use SIMD - with ARM NEON as well. + SSE2 を使用していたコードは、 + ARM NEON による SIMD 命令も使うように調整されました。 @@ -658,8 +711,8 @@ Opcache - Improved performance of fetching TLS variables in JIT'ed code in non-Glibc - builds. + Glibc 以外のビルドで JIT コンパイルされたコード中で、 + TLS 変数のフェッチ処理のパフォーマンスが向上しました。 @@ -668,7 +721,7 @@ Reflection - Improved performance of the following methods: + 以下のメソッドのパフォーマンスが向上しました: ReflectionProperty::getValue ReflectionProperty::getRawValue @@ -685,8 +738,8 @@ SPL - Improved performance of dimension accessors and methods of - SplFixedArray. + SplFixedArray の、 + 多次元のアクセス処理と、メソッドのパフォーマンスが向上しました。 @@ -695,27 +748,29 @@ Standard - Improved performance of array functions with callbacks + コールバックを指定した場合の、配列関数 (array_find, array_filter, - array_map, usort, ...). + array_map, usort, ...) + のパフォーマンスが向上しました。 - Improved performance of urlencode and - rawurlencode. + urlencode と + rawurlencode のパフォーマンスが向上しました。 - Improved unpack performance with nameless - repetitions by avoiding creating temporary strings and reparsing them. + 一時的な文字列の生成と再パースを回避することで、 + unpack の、 + 名前を付けない反復処理のパフォーマンスが向上しました。 - Improved pack performance. + pack のパフォーマンスが向上しました。 - Minor improvements in array_chunk performance. + array_chunk のパフォーマンスが少し向上しました。 @@ -724,13 +779,13 @@ XML - XMLReader - のプロパティのアクセス速度が向上しました。 + XMLReader の、 + プロパティアクセスのパフォーマンスが向上しました。 - XMLWriter - のパフォーマンスが改善し、メモリ消費量が減少しました。 + XMLWriter のパフォーマンスが向上し、 + メモリ使用量が削減されました。 From 3a3d331eac138c01143482aa6881320b28353f17 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 25 Oct 2025 20:42:41 +0900 Subject: [PATCH 4/5] added SoapClient::__doRequest undocumented backwards incompatible in PHP 8.5 https://github.com/php/doc-en/pull/4906/commits/a288458661ad8132d348368d3ca14bcd6f03c5c7 --- appendices/migration85/incompatible.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 1c586f2246..5e38ea313f 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -429,6 +429,23 @@ + + SOAP + + + SoapClient::__doRequest に、 + オプションの $uriParserClass + パラメータが新しく追加されました。 + これは、文字列と &null; を受け入れます。 + &null; を渡すと、オリジナルの parse_url + ベースのメソッドになります。 + Uri\Rfc3986\Uri や Uri\WhatWg\Url を渡すと、 + 新しいバックエンドを使います。 + + + + + SPL From 42aeee948d8619891e6e677f132c0aefee336b3f Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sat, 25 Oct 2025 20:43:12 +0900 Subject: [PATCH 5/5] added clone_with_v2 functionality. https://github.com/php/doc-en/pull/4906/commits/f38e1e1a2eedb2c4f674764112428d5b01dd0d69 --- appendices/migration85/new-features.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/appendices/migration85/new-features.xml b/appendices/migration85/new-features.xml index e3cd16e32e..9ca94ac1f9 100644 --- a/appendices/migration85/new-features.xml +++ b/appendices/migration85/new-features.xml @@ -190,6 +190,21 @@ print T1 . PHP_EOL; // Prints "0" + + Clone キーワードへの変更 + + + clone キーワード + は、関数のように振る舞うようになりました。 + そして、読み取り専用プロパティに clone して値を再代入する際に、 + 新しく $withProperties + パラメータが使えるようになりました + + + + + +