Deprecated class is not detected
javaDeveloperKid opened this issue · 2 comments
javaDeveloperKid commented
v1.2
I use deprecated class Doctrine\ORM\ORMException.
use Doctrine\ORM\ORMException; // detected deprecation by PHPStorm IDE
class MyClass
{
/**
* @throws ORMException
*/
function f() {}
}/**
* Base exception class for all ORM exceptions.
*
* @deprecated Use Doctrine\ORM\Exception\ORMException for catch and instanceof
*/
class ORMException extends ExceptionHowever phpstan/phpstan-deprecated-rules does not report this.

Double checked phpstan baseline if no one else has hidden this error.
It looks like this packages finds only method calls and not other statements (like use, catch for example).
ondrejmirtes commented
How are you using it in code? Please share code as text and not as screenshot.
Also share the declaration of the exception.
Deleted user commented
Updated issue description. I use it in @throws doc block or try..catch block.