diff --git a/composer.json b/composer.json index d96f390..a2f0ccd 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ ], "require": { "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^1.0" + "phpstan/phpstan": "dev-master" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", diff --git a/tests/Rules/Deprecations/CallToDeprecatedMethodRuleTest.php b/tests/Rules/Deprecations/CallToDeprecatedMethodRuleTest.php index f660fad..839a333 100644 --- a/tests/Rules/Deprecations/CallToDeprecatedMethodRuleTest.php +++ b/tests/Rules/Deprecations/CallToDeprecatedMethodRuleTest.php @@ -23,6 +23,10 @@ public function testDeprecatedMethodCall(): void 'Call to deprecated method deprecatedFoo() of class CheckDeprecatedMethodCall\Foo.', 7, ], + [ + 'Call to deprecated method deprecatedFoo() of class CheckDeprecatedMethodCall\Bar.', + 10, + ], [ 'Call to deprecated method deprecatedFoo2() of class CheckDeprecatedMethodCall\Foo.', 11, diff --git a/tests/Rules/Deprecations/CallToDeprecatedStaticMethodRuleTest.php b/tests/Rules/Deprecations/CallToDeprecatedStaticMethodRuleTest.php index 45a48f3..a1b2ff8 100644 --- a/tests/Rules/Deprecations/CallToDeprecatedStaticMethodRuleTest.php +++ b/tests/Rules/Deprecations/CallToDeprecatedStaticMethodRuleTest.php @@ -25,6 +25,10 @@ public function testDeprecatedStaticMethodCall(): void 'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Foo.', 6, ], + [ + 'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Bar.', + 8, + ], [ 'Call to deprecated method deprecatedFoo2() of class CheckDeprecatedStaticMethodCall\Foo.', 9, @@ -59,7 +63,7 @@ public function testDeprecatedStaticMethodCall(): void ], [ 'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Foo.', - 24, + 33, ], ] ); diff --git a/tests/Rules/Deprecations/data/call-to-deprecated-static-method.php b/tests/Rules/Deprecations/data/call-to-deprecated-static-method.php index 78f9b12..93e122c 100644 --- a/tests/Rules/Deprecations/data/call-to-deprecated-static-method.php +++ b/tests/Rules/Deprecations/data/call-to-deprecated-static-method.php @@ -26,6 +26,14 @@ public static function deprecatedFoo() } +class Bar3 extends Foo +{ + public static function callOtherDeprecatedMethod() + { + parent::deprecatedFoo(); + } +} + /** * @deprecated */