From dc1cffb3de50f55fbb33dbe2537c7207ddb887bf Mon Sep 17 00:00:00 2001 From: Dave Long Date: Sun, 1 Feb 2026 17:56:35 +0000 Subject: [PATCH] Fix #14041. --- .../DuplicateKeysInLiteralArraysRuleTest.php | 5 +++++ tests/PHPStan/Rules/Arrays/data/bug-14041.php | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/PHPStan/Rules/Arrays/data/bug-14041.php diff --git a/tests/PHPStan/Rules/Arrays/DuplicateKeysInLiteralArraysRuleTest.php b/tests/PHPStan/Rules/Arrays/DuplicateKeysInLiteralArraysRuleTest.php index 03a01b9250..75293922f7 100644 --- a/tests/PHPStan/Rules/Arrays/DuplicateKeysInLiteralArraysRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/DuplicateKeysInLiteralArraysRuleTest.php @@ -110,4 +110,9 @@ public function testBug13022(): void $this->analyse([__DIR__ . '/data/bug-13022.php'], []); } + public function testBug14041(): void + { + $this->analyse([__DIR__ . '/data/bug-14041.php'], []); + } + } diff --git a/tests/PHPStan/Rules/Arrays/data/bug-14041.php b/tests/PHPStan/Rules/Arrays/data/bug-14041.php new file mode 100644 index 0000000000..5fb6addaf3 --- /dev/null +++ b/tests/PHPStan/Rules/Arrays/data/bug-14041.php @@ -0,0 +1,14 @@ + \PDO::ERRMODE_EXCEPTION, + Mysql::ATTR_USE_BUFFERED_QUERY => TRUE, + Mysql::ATTR_FOUND_ROWS => TRUE, + \PDO::ATTR_EMULATE_PREPARES => TRUE, + Mysql::ATTR_MULTI_STATEMENTS => FALSE, + \PDO::ATTR_STRINGIFY_FETCHES => TRUE, +];