Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shyim opened this issue Oct 7, 2024 · 0 comments
Open

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

shyim opened this issue Oct 7, 2024 · 0 comments

Comments

@shyim
Copy link
Contributor

shyim commented Oct 7, 2024

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant