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
Hi there. First of all. Thanks so much for this, it has been so helpful in our projects.
I encountered an issue today that surprised me. If you are calling a class method that is deprecated on the interface level, phpstan does not complain. It surprised me only because my IDE shows me this, and I never thought about checking if this was detected in phpstan as well.
Here is a minimal example:
<?phpclass Foo implements FooInterface
{
/** * {@inheritdoc} */publicfunctioncreateBar() {}
}
interface FooInterface
{
/** * @deprecated Don't use this plz. */publicfunctioncreateBar();
}
$var = newFoo();
$var->createBar(); // I expect this to be an error, but it's not./** @var \FooInterface $var */$var = $var;
$var->createBar(); // I also expect this to be an error, and it is.
Attached also a picture of my IDE where this is clearly identified. Not that I am saying phpstan and Phpstorm should obviously have the same feature set, just for completion on this issue report :)
Hi there. First of all. Thanks so much for this, it has been so helpful in our projects.
I encountered an issue today that surprised me. If you are calling a class method that is deprecated on the interface level, phpstan does not complain. It surprised me only because my IDE shows me this, and I never thought about checking if this was detected in phpstan as well.
Here is a minimal example:
Attached also a picture of my IDE where this is clearly identified. Not that I am saying phpstan and Phpstorm should obviously have the same feature set, just for completion on this issue report :)
Here is also the phpstan.neon file:
Using phpstan/phpstan 1.2.0 and phpstan/phpstan-deprecation-rules 1.0.0
The text was updated successfully, but these errors were encountered: