Skip to content

Recognise exceptions as instances of Throwable #91

@hkdobrev

Description

@hkdobrev

With --level 5, I get errors such as this one:

Parameter #1 $throwable of static method Foo::processThrowable() expects Throwable, FooException given.

Of course in PHP 7, every exception is an instance of the special Throwable interface.

It would be nice if PHPStan knows about it out of the box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions