-
Notifications
You must be signed in to change notification settings - Fork 668
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
Plugins implementing FunctionReturnTypeProviderInterface
are not triggered anymore
#10275
Comments
Hey @boesing, can you reproduce the issue on https://psalm.dev ? |
Oh, as I can see, they are actually not triggered in case some other return type provider was providing a return type. Any ideas on how plugins can get a higher priority than those handlers registered in the Maybe |
For inbuilt (default PHP) functions this is kind of on purpose (by accident :D) - if you have more specific types a PR would be welcome and make more sense than having this in a plugin, as everybody would benefit from that (if you have a better sprintf return type provider) |
I prefer plugins as they are somewhat opionated and having this part of psalm itself would shift anything regarding issues to this repository which then also means maintenance. I can add some parts to psalm but overall I'd prefer plugins having more power over internal stuff is why plugins exist in the first place. 🤔 So I'd be fine with migrating some stuff to psalm while having my plugin for some more specific/opinionated/to be tested stuff on top. Which will then still require psalm to execute plugins afterwards. It was some what unexpected that suddenly my plugin return type provider was not called anymore. Maybe even call any plugin and then use type combinator to merge results 🤔 |
Starting with v5.13.0, plugins providing
FunctionReturnTypeProviderInterface
are not properly triggered anymore.To reproduce this, create a plugin like this:
The text was updated successfully, but these errors were encountered: