Skip to content

ext/pdo: document the PHP 8.5 fetch mode changes and deprecations - #5817

Merged
kamil-tekiela merged 1 commit into
php:masterfrom
lacatoire:pdo-85
Sep 1, 2026
Merged

kamil-tekiela merged 1 commit into
php:masterfrom
lacatoire:pdo-85

Conversation

@lacatoire

@lacatoire lacatoire commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Documents the PHP 8.5 fetch mode changes and deprecations of ext/pdo: the new constant values, the ValueErrors thrown for PDO::FETCH_INTO and PDO::FETCH_PROPS_LATE, the CUFA semantics of the PDO::FETCH_CLASS constructor arguments, the Error thrown when PDOStatement::setFetchMode() is called during a fetch, the deprecation of the uri: DSN scheme and of the driver specific constants and methods, and the Firebird cursor name ValueError.

Tracker items:

@lacatoire lacatoire added the 8.5 label Aug 31, 2026
@lacatoire lacatoire added this to the PHP 8.5 milestone Aug 31, 2026
Comment thread reference/pdo/pdo.xml Resolved
Comment thread reference/pdo/pdo.xml Resolved
@kamil-tekiela
kamil-tekiela merged commit e16d04c into php:master Sep 1, 2026
2 checks passed
@lacatoire
lacatoire deleted the pdo-85 branch September 1, 2026 13:11
lacatoire added a commit to php/doc-fr that referenced this pull request Sep 1, 2026
…ations (#3468)

Translation of php/doc-en#5817 (commit e16d04c): the PDO fetch constants are
deprecated in favour of the PDO::FETCH_* ones, the uri: DSN scheme is deprecated,
string keys in constructorArgs act as named arguments, support for by-reference
parameters is removed, and the new errors sections are added. EN-Revision updated.
KentarouTakeda added a commit to php/doc-ja that referenced this pull request Sep 21, 2026
* PHP 8.5 での PDO の fetch mode の変更と非推奨化に追従

原文の php/doc-en@e16d04c (php/doc-en#5817) に追従する。

- PDOStatement::fetchAll() で PDO::FETCH_INTO を使った場合と、
  PDO::FETCH_CLASS 以外と PDO::FETCH_PROPS_LATE を併用した場合の ValueError
- PDOStatement::setFetchMode() の constructorArgs が CUFA の規約に従うように
  なったことと、リファレンス渡しのパラメータへの自動ラップの廃止
- PDOStatement::setAttribute() で Firebird ドライバのカーソル名が長すぎる
  場合の ValueError
- PDO::__construct() の uri: DSN スキームの非推奨化
- PDO クラスのドライバ固有の定数の非推奨化

* PHP 8.5 での ext/pdo_sqlite の追加と挙動変更に追従

原文の php/doc-en@eff8e0d (php/doc-en#5818) に追従する。

- Pdo\Sqlite の定数 12 件の追加(ATTR_BUSY_STATEMENT、ATTR_EXPLAIN_STATEMENT、
  EXPLAIN_MODE_*、ATTR_TRANSACTION_MODE、TRANSACTION_MODE_*、OK、DENY、IGNORE)
- Pdo\Sqlite::setAuthorizer() のページを新規翻訳
- PDO::quote() で SQLite ドライバを使う場合に null バイトを含む文字列が
  例外または警告になったこと
- Pdo\Sqlite::createCollation() のコールバックが int を返さない場合の TypeError
- libsqlite の必須バージョンが 3.7.17 以上になったこと

pdo_sqlite/configure.xml では、原文が PHP 7.4.0 の要件の直後に 8.5.0 の要件を
挿入したため、後続の「それより前のバージョンでは」の指す先が 8.5.0 に読み替わる。
この 1 行のみ「PHP 7.4.0 より前のバージョンでは」と明示した。

* PDO のインストール手順の更新に追従

原文の php/doc-en@6e58d11 (php/doc-en#5277) に追従する。

Windows での手順から dl() による実行時ロードの案内が削除され、php.ini で
有効にする方法に一本化された。あわせて "DLL" が "extension files" に改められた。

* PDO_MYSQL の DSN への user / password の追加に追従

原文の php/doc-en@57a2f4c (php/doc-en#5706) に追従する。

DSN で user と password を指定できること、およびコンストラクタの引数が
DSN の指定より優先されることが追記された。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants