From fa5caa80535c96a4809873ae3c4911ea1a80c3f9 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 21 Jun 2026 21:09:52 +0200 Subject: [PATCH] PHP 8.4 polyfill: update the ruleset for PDO classes / sync with v1.34.0 As of version v1.34.0, the PDO driver specific sub-classes as introduced in PHP 8.4 are now included in the Symfony polyfill. Ref: * symfony/polyfill 549 * https://github.com/symfony/polyfill/commit/d78a0565914a52a2a6e846b4cefb02f59a6a0b05 --- PHPCompatibilitySymfonyPolyfillPHP84/ruleset.xml | 11 ++++++++++- Test/SymfonyPolyfillPHP84Test.php | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/PHPCompatibilitySymfonyPolyfillPHP84/ruleset.xml b/PHPCompatibilitySymfonyPolyfillPHP84/ruleset.xml index 2347520..083de97 100644 --- a/PHPCompatibilitySymfonyPolyfillPHP84/ruleset.xml +++ b/PHPCompatibilitySymfonyPolyfillPHP84/ruleset.xml @@ -25,7 +25,12 @@ Detection for the Deprecated attribute is incomplete in PHPCompatibility 10.0.0-alpha1. Handling for this should be added once the detection implementation is known. --> - + + + + + + @@ -43,6 +48,10 @@ /polyfill-php84/Resources/stubs/ReflectionConstant\.php$ + + /polyfill-php84/Resources/stubs/Pdo/(Dblib|Firebird|Mysql|Odbc|Pgsql|Sqlite)\.php$ + + /polyfill-php84/Resources/stubs/Deprecated\.php$ diff --git a/Test/SymfonyPolyfillPHP84Test.php b/Test/SymfonyPolyfillPHP84Test.php index 93f8d28..918713e 100644 --- a/Test/SymfonyPolyfillPHP84Test.php +++ b/Test/SymfonyPolyfillPHP84Test.php @@ -30,3 +30,11 @@ #[Deprecated] function foo() {} */ + +$db = new Pdo\Dblib; +$db = new \Pdo\Firebird; +function doSomething( + Pdo\Mysql $db +) : Pdo\Odbc {} +$db = new Pdo\Pgsql; +$db = new \Pdo\Sqlite;