From b7ad8811969541c4e9503ccb0342481bd651a173 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sun, 27 Jul 2025 20:29:09 +0200 Subject: [PATCH] Add non regression test --- .../CallToFunctionParametersRuleTest.php | 7 +++++++ .../PHPStan/Rules/Functions/data/bug-3506.php | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/PHPStan/Rules/Functions/data/bug-3506.php diff --git a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php index 385fab83b5..45e6e9fdfd 100644 --- a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php @@ -2192,6 +2192,13 @@ public function testBug13065(): void $this->analyse([__DIR__ . '/data/bug-13065.php'], $errors); } + public function testBug3506(): void + { + $this->checkExplicitMixed = true; + $this->checkImplicitMixed = true; + $this->analyse([__DIR__ . '/data/bug-3506.php'], []); + } + #[RequiresPhp('>= 8.0')] public function testBug12317(): void { diff --git a/tests/PHPStan/Rules/Functions/data/bug-3506.php b/tests/PHPStan/Rules/Functions/data/bug-3506.php new file mode 100644 index 0000000000..ef2eb53a25 --- /dev/null +++ b/tests/PHPStan/Rules/Functions/data/bug-3506.php @@ -0,0 +1,18 @@ +dummy(function(int $a, ...$args) : void{ + var_dump(...$args); + }); + } +}