-
-
Notifications
You must be signed in to change notification settings - Fork 930
Closed
phpstan/phpstan-src
#4280Labels
Milestone
Description
Bug report
class ApiLimitExceededException extends \Exception
{
protected $message = 'You have exceeded the 300 API calls per minute.';
}
leads to
Property ApiLimitExceededException::$message has no type specified.
Adding a PHPDoc /** @var string */
leads to
PHPDoc type string of property ApiLimitExceededException::$message is not the same as PHPDoc type mixed of overridden property Exception::$message.
Code snippet that reproduces the problem
https://phpstan.org/r/43e108f0-2a99-41e0-b95e-366132e294f2
Expected output
Currently this can only be silenced with ignoreErrors ('#^Property App\\HttpClient\\Exception\\(.*)\:\:\$message has no type specified.$#'
)
I'd expect that PHPStan knows that $message from Exception cannot have a type assigned
Did PHPStan help you today? Did it make you happy in any way?
❤️