-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Arguments expecting callables should describe the full signature of callables #252
Comments
@stof Thanks for reporting and linking the downstream ticket 👍 I think we all agree that adding more specific types for callables would be useful. I'm happy to look into this once time allows, otherwise we're happy to accept PRs. For the record, this appears to be clearly documented behavior with its BC implications mentioned in the changelog, so this would be more of feature addition or maintenance rather than a bug, see also related tickets #213, #246 and #247. |
@clue sure, the upgrade guide does not actually mention anything for the signature of the |
Line 48 in baf9ab5
|
@clue what I mean is that none of the code examples mention that API as an impacted one (and it is the only API for which static analysis won't help, so I would say it would probably have been the most important one to show explicitly) |
@clue I started to look at that and I'm struggling with the type of the |
@clue do you have any insight on the expected behavior for the canceller callback ? |
See PR #253 which adds stricter types for all callable arguments. Spent the better half of the day working on all edge cases and making sure this is fully covered in our tests. I hope this helps! 👍 If so, consider supporting this project, for example by becoming a sponsor ❤️ |
composer/composer#11619 is caused by a wrong usage of the
$resolve
callback passed as argument to the$resolver
callable of the Promise constructor. In version 3, it cannot be called without argument anymore.However, as callable signatures are not described in the argument types, static analysis tools are unable to detect the issue.
The text was updated successfully, but these errors were encountered: