diff --git a/composer.json b/composer.json index 128e548dae..27b4b41835 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "nette/utils": "dev-master as 3.1.99", "nikic/php-parser": "4.7.0", "ondram/ci-detector": "^3.4.0", - "ondrejmirtes/better-reflection": "4.3.21", + "ondrejmirtes/better-reflection": "4.3.22", "phpdocumentor/reflection-docblock": "4.3.4", "phpstan/phpdoc-parser": "^0.4.8", "react/child-process": "^0.6.1", diff --git a/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php b/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php index bc10a2709a..9ec4c9f275 100644 --- a/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php +++ b/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php @@ -342,4 +342,13 @@ public function testBug3478(): void $this->analyse([__DIR__ . '/data/bug-3478.php'], []); } + public function testBug3629(): void + { + if (!self::$useStaticReflectionProvider) { + $this->markTestSkipped('Test require static reflection.'); + } + $this->phpVersionId = PHP_VERSION_ID; + $this->analyse([__DIR__ . '/data/bug-3629.php'], []); + } + } diff --git a/tests/PHPStan/Rules/Methods/data/bug-3629.php b/tests/PHPStan/Rules/Methods/data/bug-3629.php new file mode 100644 index 0000000000..320197ad09 --- /dev/null +++ b/tests/PHPStan/Rules/Methods/data/bug-3629.php @@ -0,0 +1,11 @@ +