From e177a86cbe63bfaf4382459693281d0189f6d903 Mon Sep 17 00:00:00 2001 From: lcatoire Date: Fri, 10 Jul 2026 16:39:15 +0200 Subject: [PATCH 1/5] =?UTF-8?q?feat(pdo):=20documenter=20les=20=C3=A9volut?= =?UTF-8?q?ions=20PDO,=20PDO=5FPGSQL=20et=20PDO=5FFirebird=20en=20PHP=208.?= =?UTF-8?q?4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/pdo/pdo/getattribute.xml | 1 + reference/pdo/pdo/prepare.xml | 9 +++++++++ reference/pdo/pdostatement/getattribute.xml | 7 +++++++ reference/pdo_firebird/configure.xml | 5 +++++ reference/pdo_pgsql/configure.xml | 4 ++++ reference/pdo_pgsql/pdo-pgsql.xml | 8 ++++++++ reference/pdo_pgsql/reference.xml | 9 +++++++++ 7 files changed, 43 insertions(+) diff --git a/reference/pdo/pdo/getattribute.xml b/reference/pdo/pdo/getattribute.xml index eebbc93d3ae2..e5ac1babeb7b 100644 --- a/reference/pdo/pdo/getattribute.xml +++ b/reference/pdo/pdo/getattribute.xml @@ -49,6 +49,7 @@ PDO::ATTR_PREFETCH PDO::ATTR_SERVER_INFO PDO::ATTR_SERVER_VERSION + PDO::ATTR_STRINGIFY_FETCHES PDO::ATTR_TIMEOUT diff --git a/reference/pdo/pdo/prepare.xml b/reference/pdo/pdo/prepare.xml index 006de0ced5d2..fe26d647a20e 100644 --- a/reference/pdo/pdo/prepare.xml +++ b/reference/pdo/pdo/prepare.xml @@ -71,6 +71,15 @@ the ?? string will be translated to ? when sending the query to the database. + + As of PHP 8.4.0, PDO uses driver-specific SQL parsers to locate parameter + markers, so that markers appearing inside string literals or comments are + not mistaken for placeholders. The default parser recognizes single- and + double-quoted string literals (with doubling as the escaping mechanism), as + well as two-dashes and non-nested C-style comments. Individual drivers may + provide a parser that recognizes additional syntax; refer to the + driver-specific documentation for details. + &reftitle.parameters; diff --git a/reference/pdo/pdostatement/getattribute.xml b/reference/pdo/pdostatement/getattribute.xml index ea458ce1c6b6..c6cd04a2d185 100644 --- a/reference/pdo/pdostatement/getattribute.xml +++ b/reference/pdo/pdostatement/getattribute.xml @@ -21,6 +21,13 @@ (Firebird and ODBC specific): Get the name of cursor for UPDATE ... WHERE CURRENT OF. + + + Pdo\Pgsql::ATTR_RESULT_MEMORY_SIZE + (PostgreSQL specific, available as of PHP 8.4.0): + Get the amount of memory, in bytes, allocated to the query result. + + Note that driver specific attributes must not be used with other drivers. diff --git a/reference/pdo_firebird/configure.xml b/reference/pdo_firebird/configure.xml index 6ef9611e5c25..66cf8d3c3066 100644 --- a/reference/pdo_firebird/configure.xml +++ b/reference/pdo_firebird/configure.xml @@ -12,6 +12,11 @@ $ ./configure --with-pdo-firebird ]]> + + As of PHP 8.4.0, this extension uses some Firebird C++ APIs and therefore + requires a C++ compiler to be built, and must be built against fbclient 3.0 + or higher. + diff --git a/reference/pdo_pgsql/reference.xml b/reference/pdo_pgsql/reference.xml index dfc8d58f81aa..7006801fe634 100644 --- a/reference/pdo_pgsql/reference.xml +++ b/reference/pdo_pgsql/reference.xml @@ -119,6 +119,15 @@ + + + As of PHP 8.4.0, credentials specified in the DSN + (user and password) take priority + over the corresponding arguments passed to the + PDO constructor. In earlier versions, the + PDO constructor arguments took precedence. + + All semicolons in the DSN string are replaced by spaces, because PostgreSQL From d9d23ec2120f21b7bc20922cbbd235d9b995d844 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Fri, 24 Jul 2026 05:48:32 +0200 Subject: [PATCH 2/5] Update configure.xml Co-authored-by: Kamil Tekiela --- reference/pdo_firebird/configure.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/pdo_firebird/configure.xml b/reference/pdo_firebird/configure.xml index 66cf8d3c3066..de0eb9a0eb96 100644 --- a/reference/pdo_firebird/configure.xml +++ b/reference/pdo_firebird/configure.xml @@ -14,7 +14,7 @@ $ ./configure --with-pdo-firebird As of PHP 8.4.0, this extension uses some Firebird C++ APIs and therefore - requires a C++ compiler to be built, and must be built against fbclient 3.0 + requires a C++ compiler, and must be built against fbclient 3.0 or higher. From f5ad5ae58e166b1668582c38e97464f7f43fb16f Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Fri, 24 Jul 2026 05:49:15 +0200 Subject: [PATCH 3/5] Update prepare.xml Co-authored-by: Kamil Tekiela --- reference/pdo/pdo/prepare.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/pdo/pdo/prepare.xml b/reference/pdo/pdo/prepare.xml index fe26d647a20e..5442b68a830a 100644 --- a/reference/pdo/pdo/prepare.xml +++ b/reference/pdo/pdo/prepare.xml @@ -75,7 +75,7 @@ As of PHP 8.4.0, PDO uses driver-specific SQL parsers to locate parameter markers, so that markers appearing inside string literals or comments are not mistaken for placeholders. The default parser recognizes single- and - double-quoted string literals (with doubling as the escaping mechanism), as + double-quoted string literals, as well as two-dashes and non-nested C-style comments. Individual drivers may provide a parser that recognizes additional syntax; refer to the driver-specific documentation for details. From 722a4219625228f7e9b52e3f71c5bee68eedbbe5 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Fri, 24 Jul 2026 08:35:58 +0200 Subject: [PATCH 4/5] pdo: correct getAttribute generic list, scope backslash-escape note to 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. --- reference/pdo/pdo/getattribute.xml | 9 ++------- reference/pdo/pdo/prepare.xml | 12 ++++++------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/reference/pdo/pdo/getattribute.xml b/reference/pdo/pdo/getattribute.xml index e5ac1babeb7b..02acc2a65c38 100644 --- a/reference/pdo/pdo/getattribute.xml +++ b/reference/pdo/pdo/getattribute.xml @@ -38,19 +38,14 @@ One of the PDO::ATTR_* constants. The generic attributes that apply to database connections are as follows: - PDO::ATTR_AUTOCOMMIT PDO::ATTR_CASE - PDO::ATTR_CLIENT_VERSION - PDO::ATTR_CONNECTION_STATUS + PDO::ATTR_DEFAULT_FETCH_MODE PDO::ATTR_DRIVER_NAME PDO::ATTR_ERRMODE PDO::ATTR_ORACLE_NULLS PDO::ATTR_PERSISTENT - PDO::ATTR_PREFETCH - PDO::ATTR_SERVER_INFO - PDO::ATTR_SERVER_VERSION + PDO::ATTR_STATEMENT_CLASS PDO::ATTR_STRINGIFY_FETCHES - PDO::ATTR_TIMEOUT diff --git a/reference/pdo/pdo/prepare.xml b/reference/pdo/pdo/prepare.xml index 5442b68a830a..c06f9c93d5a1 100644 --- a/reference/pdo/pdo/prepare.xml +++ b/reference/pdo/pdo/prepare.xml @@ -56,12 +56,12 @@ - The parser used for emulated prepared statements and for - rewriting named or question mark style parameters supports the non standard - backslash escapes for single- and double quotes. That means that terminating - quotes immediately preceded by a backslash are not recognized as such, which - may result in wrong detection of parameters causing the prepared statement to - fail when it is executed. A work-around is to not use emulated prepares for + Before PHP 8.4.0, the parser used for emulated prepared statements and for + rewriting named or question mark style parameters supported the non standard + backslash escapes for single- and double quotes. That meant that terminating + quotes immediately preceded by a backslash were not recognized as such, which + could result in wrong detection of parameters causing the prepared statement to + fail when it was executed. A work-around was to not use emulated prepares for such SQL queries, and to avoid rewriting of parameters by using a parameter style which is natively supported by the driver. From fb9b4c44d38bd555de92a5d270219a2c25e4e879 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Fri, 24 Jul 2026 08:43:35 +0200 Subject: [PATCH 5/5] pdo: drop 'some' in firebird note, clarify driver parser may differ --- reference/pdo/pdo/prepare.xml | 2 +- reference/pdo_firebird/configure.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/pdo/pdo/prepare.xml b/reference/pdo/pdo/prepare.xml index c06f9c93d5a1..001010d795a7 100644 --- a/reference/pdo/pdo/prepare.xml +++ b/reference/pdo/pdo/prepare.xml @@ -77,7 +77,7 @@ not mistaken for placeholders. The default parser recognizes single- and double-quoted string literals, as well as two-dashes and non-nested C-style comments. Individual drivers may - provide a parser that recognizes additional syntax; refer to the + provide a parser that recognizes additional or different syntax; refer to the driver-specific documentation for details. diff --git a/reference/pdo_firebird/configure.xml b/reference/pdo_firebird/configure.xml index de0eb9a0eb96..653b14eeaf8a 100644 --- a/reference/pdo_firebird/configure.xml +++ b/reference/pdo_firebird/configure.xml @@ -13,7 +13,7 @@ $ ./configure --with-pdo-firebird - As of PHP 8.4.0, this extension uses some Firebird C++ APIs and therefore + As of PHP 8.4.0, this extension uses Firebird C++ APIs and therefore requires a C++ compiler, and must be built against fbclient 3.0 or higher.