From 1c48d93c4981ea5f9916cbbaea530506ac62a745 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 21 Jul 2026 09:47:25 +0200 Subject: [PATCH] Remove obsolete PDO.patch for phpstorm-stubs The patch replaced the PDO::FETCH_DEFAULT default value of PDO::pgsqlGetNotify() with a literal because resolving the constant used to fail with "Reflection error: Could not locate constant PDO::FETCH_DEFAULT" (phpstan/phpstan#6255). The constant now resolves fine - php-8-stubs declare both the PDO class constants and pgsqlGetNotify() itself. Verified with the original reproducer (testBug6255) on phpVersion 7.4, 8.1, and 8.5. Co-Authored-By: Claude Fable 5 --- composer.json | 1 - composer.lock | 2 +- patches/PDO.patch | 12 ------------ 3 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 patches/PDO.patch diff --git a/composer.json b/composer.json index 87171378c13..c8b58f4a25d 100644 --- a/composer.json +++ b/composer.json @@ -133,7 +133,6 @@ "patches/Stream.patch" ], "jetbrains/phpstorm-stubs": [ - "patches/PDO.patch", "patches/ReflectionProperty.patch", "patches/SessionHandler.patch", "patches/xmlreader.patch", diff --git a/composer.lock b/composer.lock index 0dab5cccef9..2d17e868e1e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f128753d8eedc9b2d387a23643fe5234", + "content-hash": "5629f13e371ac496ef0742c761cb1a70", "packages": [ { "name": "clue/ndjson-react", diff --git a/patches/PDO.patch b/patches/PDO.patch deleted file mode 100644 index 05e1ac18395..00000000000 --- a/patches/PDO.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- PDO/PDO.php 2021-12-26 15:44:39.000000000 +0100 -+++ PDO/PDO.php 2022-01-03 22:54:21.000000000 +0100 -@@ -1610,7 +1610,7 @@ namespace { - * @return array|false if one or more notifications is pending, returns a single row, - * with fields message and pid, otherwise FALSE. - */ - #[Deprecated('use Pdo\Pgsql::getNotify instead', '\Pdo\Pgsql::getNotify(%parametersList%)', since: '8.5')] -- public function pgsqlGetNotify($fetchMode = PDO::FETCH_DEFAULT, $timeoutMilliseconds = 0) {} -+ public function pgsqlGetNotify($fetchMode = 1, $timeoutMilliseconds = 0) {} - - /** - * (PHP 5 >= 5.6.0, PHP 7, PHP 8)