From a57ce052cd827357447d7ff78b12cb664663c603 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 1 Sep 2024 12:17:04 +0200 Subject: [PATCH] Don't export php_pdo_int.h This is, as the name and a comment in the header imply, an internal header which is not supposed to be used by extensions other than PDO (not even by drivers). Since there is apparently no need to include this header in the parsers of the drivers, we remove these includes, and no longer declare the header to be installed. Given that the header is only exported for a couple of weeks[1], this is not considered to be a BC break, because it's unlikely that external drivers have already been adjusted to use this header, and otherwise they can still be fixed; PHP 8.4 is still in the pre-release stage. [1] Closes GH-15688. --- NEWS | 4 ++++ ext/pdo/config.m4 | 1 - ext/pdo/config.w32 | 1 - ext/pdo/pdo_sql_parser.re | 1 - ext/pdo_mysql/mysql_sql_parser.re | 1 - ext/pdo_pgsql/pgsql_sql_parser.re | 1 - ext/pdo_sqlite/sqlite_sql_parser.re | 1 - 7 files changed, 4 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 3488723b8a4..ec32bdfd088 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,10 @@ PHP NEWS - GD: . Added gdImageClone to bundled libgd. (David Carlier) +- PDO: + . The internal header php_pdo_int.h is no longer installed; it is not + supposed to be used by PDO drivers. (cmb) + - PDO_Firebird: . Fixed GH-15604 (Always make input parameters nullable). (sim1984) diff --git a/ext/pdo/config.m4 b/ext/pdo/config.m4 index 2145f053979..dccf8987858 100644 --- a/ext/pdo/config.m4 +++ b/ext/pdo/config.m4 @@ -16,7 +16,6 @@ if test "$PHP_PDO" != "no"; then pdo_sql_parser.h php_pdo_driver.h php_pdo_error.h - php_pdo_int.h php_pdo.h ])) PHP_ADD_MAKEFILE_FRAGMENT diff --git a/ext/pdo/config.w32 b/ext/pdo/config.w32 index d92ccb926ab..d1768ed86cd 100644 --- a/ext/pdo/config.w32 +++ b/ext/pdo/config.w32 @@ -10,7 +10,6 @@ if (PHP_PDO != "no") { "pdo_sql_parser.h " + "php_pdo_driver.h " + "php_pdo_error.h " + - "php_pdo_int.h " + "php_pdo.h" ); } diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 1de8a618549..a87fd473404 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -16,7 +16,6 @@ #include "php.h" #include "php_pdo_driver.h" -#include "php_pdo_int.h" #include "pdo_sql_parser.h" static int default_scanner(pdo_scanner_t *s) diff --git a/ext/pdo_mysql/mysql_sql_parser.re b/ext/pdo_mysql/mysql_sql_parser.re index 7dc7feeb704..01afbefaaa8 100644 --- a/ext/pdo_mysql/mysql_sql_parser.re +++ b/ext/pdo_mysql/mysql_sql_parser.re @@ -17,7 +17,6 @@ #include "php.h" #include "ext/pdo/php_pdo_driver.h" -#include "ext/pdo/php_pdo_int.h" #include "ext/pdo/pdo_sql_parser.h" int pdo_mysql_scanner(pdo_scanner_t *s) diff --git a/ext/pdo_pgsql/pgsql_sql_parser.re b/ext/pdo_pgsql/pgsql_sql_parser.re index ff7f2f731f0..caea615c407 100644 --- a/ext/pdo_pgsql/pgsql_sql_parser.re +++ b/ext/pdo_pgsql/pgsql_sql_parser.re @@ -17,7 +17,6 @@ #include "php.h" #include "ext/pdo/php_pdo_driver.h" -#include "ext/pdo/php_pdo_int.h" #include "ext/pdo/pdo_sql_parser.h" int pdo_pgsql_scanner(pdo_scanner_t *s) diff --git a/ext/pdo_sqlite/sqlite_sql_parser.re b/ext/pdo_sqlite/sqlite_sql_parser.re index d1b6f099d73..5678e602557 100644 --- a/ext/pdo_sqlite/sqlite_sql_parser.re +++ b/ext/pdo_sqlite/sqlite_sql_parser.re @@ -17,7 +17,6 @@ #include "php.h" #include "ext/pdo/php_pdo_driver.h" -#include "ext/pdo/php_pdo_int.h" #include "ext/pdo/pdo_sql_parser.h" int pdo_sqlite_scanner(pdo_scanner_t *s)