Skip to content

ext/pdo: PHP 8.4 changes across PDO, PDO_PGSQL and PDO_Firebird - #5703

Merged
jordikroon merged 5 commits into
php:masterfrom
lacatoire:feat/pdo-8.4-changes
Aug 3, 2026
Merged

ext/pdo: PHP 8.4 changes across PDO, PDO_PGSQL and PDO_Firebird#5703
jordikroon merged 5 commits into
php:masterfrom
lacatoire:feat/pdo-8.4-changes

Conversation

@lacatoire

@lacatoire lacatoire commented Jul 23, 2026

Copy link
Copy Markdown
Member

Documents the PHP 8.4 changes across the PDO family.

PDO core

  • Default SQL parser that recognises quoted literals and comments.
  • PDO::ATTR_STRINGIFY_FETCHES is now retrievable via PDO::getAttribute().
  • Pdo\Pgsql::ATTR_RESULT_MEMORY_SIZE is now retrievable via PDOStatement::getAttribute().

PDO_PGSQL

  • Requires libpq 10.0+.
  • DSN credentials now take priority over constructor arguments.
  • Using ?? inside a dollar-quoted string is deprecated.

PDO_Firebird

  • Now requires a C++ compiler and fbclient 3.0+ to build.

Sources

@lacatoire
lacatoire requested a review from kamil-tekiela as a code owner July 23, 2026 19:42
@jordikroon

Copy link
Copy Markdown
Member

@kamil-tekiela

Copy link
Copy Markdown
Member

I propose that when we create PRs for new language changes, we link the commit/PR/RFC so that it's easier to verify the changes. Right now, I need to go on a research sidequest to understand what's changed.

Comment thread reference/pdo_firebird/configure.xml Outdated
Comment thread reference/pdo_firebird/configure.xml Outdated
Comment thread reference/pdo_pgsql/reference.xml
Comment thread reference/pdo_pgsql/pdo-pgsql.xml
Comment thread reference/pdo/pdo/prepare.xml Outdated
Comment thread reference/pdo/pdo/prepare.xml Outdated
Comment thread reference/pdo/pdo/getattribute.xml
Comment thread reference/pdo/pdo/getattribute.xml
lacatoire and others added 5 commits August 3, 2026 09:17
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
…o pre-8.4

getattribute.xml: PDO::getAttribute handles exactly 8 generic attributes
(pdo_dbh.c PDO::getAttribute switch); the simplelist listed 7 driver-specific
ones and missed STATEMENT_CLASS/DEFAULT_FETCH_MODE. Replace it with the 8 generic
attributes (STRINGIFY_FETCHES fetchable as of 8.4, php-src#12793).

prepare.xml: the default 8.4 parser (pdo_sql_parser.re) recognises doubled
quotes, not backslash escapes, so the note about backslash escapes now describes
pre-8.4 behaviour; scope it accordingly.
@lacatoire
lacatoire force-pushed the feat/pdo-8.4-changes branch from fb9b4c4 to 9b27d35 Compare August 3, 2026 07:17

@kamil-tekiela kamil-tekiela left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jordikroon
jordikroon merged commit 371e92c into php:master Aug 3, 2026
2 checks passed
@lacatoire
lacatoire deleted the feat/pdo-8.4-changes branch August 3, 2026 15:46
KentarouTakeda added a commit to KentarouTakeda/php-doc-ja that referenced this pull request Aug 9, 2026
php/doc-en#5703(ext/pdo: PHP 8.4 changes across PDO, PDO_PGSQL and PDO_Firebird)に追従。

- reference/pdo/pdo/prepare.xml — ドライバ固有の SQL パーサーの説明を追加。
  あわせて 8.4.0 より前のパーサーについての注記を過去形にする
- reference/pdo/pdo/getattribute.xml — 取得できる属性の一覧を原文に合わせて差し替え
- reference/pdo/pdostatement/getattribute.xml — Pdo\Pgsql::ATTR_RESULT_MEMORY_SIZE を追加
- reference/pdo_pgsql/reference.xml — DSN の認証情報がコンストラクタの引数より
  優先される旨の注記を追加
- reference/pdo_pgsql/pdo-pgsql.xml — ドル記号で囲まれた文字列の中で疑問符を
  ?? としてエスケープすることが非推奨になった旨の注記を追加
- reference/pdo_pgsql/configure.xml — libpq 10.0 以降が必要になった旨を追加
- reference/pdo_firebird/configure.xml — C++ コンパイラと fbclient 3.0 以降が
  必要になった旨を追加
KentarouTakeda added a commit to php/doc-ja that referenced this pull request Aug 9, 2026
* PDO・PDO_PGSQL・PDO_Firebird の PHP 8.4 の変更を追従

php/doc-en#5703(ext/pdo: PHP 8.4 changes across PDO, PDO_PGSQL and PDO_Firebird)に追従。

- reference/pdo/pdo/prepare.xml — ドライバ固有の SQL パーサーの説明を追加。
  あわせて 8.4.0 より前のパーサーについての注記を過去形にする
- reference/pdo/pdo/getattribute.xml — 取得できる属性の一覧を原文に合わせて差し替え
- reference/pdo/pdostatement/getattribute.xml — Pdo\Pgsql::ATTR_RESULT_MEMORY_SIZE を追加
- reference/pdo_pgsql/reference.xml — DSN の認証情報がコンストラクタの引数より
  優先される旨の注記を追加
- reference/pdo_pgsql/pdo-pgsql.xml — ドル記号で囲まれた文字列の中で疑問符を
  ?? としてエスケープすることが非推奨になった旨の注記を追加
- reference/pdo_pgsql/configure.xml — libpq 10.0 以降が必要になった旨を追加
- reference/pdo_firebird/configure.xml — C++ コンパイラと fbclient 3.0 以降が
  必要になった旨を追加

* SimpleXML で暗黙の巻き戻しがなくなったことを追従

php/doc-en#5737(ext/simplexml: Document that get methods and string casts no
longer implicitly rewind)に追従。PHP 8.4.0 以降、値を取得するメソッドの呼び出しと
string へのキャストがイテレータを暗黙的に巻き戻さなくなった旨を追加する。

- reference/simplexml/simplexmlelement.xml
- reference/simplexml/simplexmlelement/rewind.xml

* language/basic-syntax.xml を原文の修正に追従

- php/doc-en#5724(Fix reference to non-existent "example three")
  短縮タグの説明が、存在しない「例 3」を参照していた誤りを修正する。
  このページに example は 1 つしかなく、その中で 3 つのコードが手で番号付け
  されているだけなので、原文は「上の例の 3 番目」を指す表現に変わった。
  あわせて当該段落が para から simpara になったのを反映する。

- php/doc-en#5747(Example emits warning unrelated to content)
  「条件を使った高度なエスケープ」のコード例が、未定義の変数 $expression を
  参照していて内容と無関係な警告を出していたのを修正する。

* entities/entities.remove.ent の revtag を更新

php/doc-en#5722(Convert and move global.ent into doc-en)で、削除予定の
エンティティ 3 件(reference.pdo-cubrid.entities.PDO、
reference.pdo-pgsql.entities.PDO、reference.pdo-sqlite.entities.PDO)が
このファイルに移された。

原文が「翻訳側は entities を空のままにし、revtag だけ更新する」と明記している
ファイルなので、EN-Revision だけを更新する。上記 3 件は ja ツリーからの参照が
ゼロであることを確認した。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants