You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I am overriding tearDown() and as the rule suggests i need to call the parent::teardown() inside it , the only problem here is that i want to call it from a try-catch block which phpstan-phpunit doesn't recognise as a valid call to the parent method.
So, I am overriding tearDown() and as the rule suggests i need to call the parent::teardown() inside it , the only problem here is that i want to call it from a try-catch block which
phpstan-phpunit
doesn't recognise as a valid call to the parent method.phpstan doesn't have this bug i checked in independently https://phpstan.org/r/1a212fa2-3cba-4c82-80db-7c75a8346f50
The main issue seems to be in
$hasParentCall = $this->hasParentClassCall($node->getOriginalNode()->getStmts(), strtolower($methodName));
Mainly
\PHPStan\Rules\PHPUnit\ShouldCallParentMethodsRule::hasParentClassCall
I think this lacks the logic to detect parent class calls inside a try-catch block.
The text was updated successfully, but these errors were encountered: