Skip to content

Support for native return type missing from parent @return tag #412

Open
@shyim

Description

@shyim

The EventSubscriberInterface from Symfony has an @return annotation, and all classes that implement it and have no native return type get a deprecation error message.

class Foo implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
}
}
Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" might add "array" as a native return type declaration in the future. Do the same in implementation "Foo" now to avoid errors or add an explicit @return annotation to suppress this message.

It would be nice if we could get the error in PHPStan instead of running the actual application :)

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