-
Notifications
You must be signed in to change notification settings - Fork 547
Change curl_setopt function signature based on 2nd arg #1719
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
Conversation
|
(lets finish all my other open non-draft PRs before finalizing/discussing this one here. I had a hour of free time.. ;)) |
|
Thank you for mapping out the types! However this doesn't need a new rule, just modifications to the function signature on the fly. This is already done for array_map and similar in https://github.com/phpstan/phpstan-src/blob/1.8.x/src/Reflection/ParametersAcceptorSelector.php. When that's done, the existing rule (call to function parameters) will pick it up and report. |
e40c67b to
4702e5e
Compare
4a8e73c to
0c471c7
Compare
0c471c7 to
8a8b1d9
Compare
|
So nice, right? :) Please rebase and solve the conflict, thanks. |
73bd63e to
0a17bf3
Compare
|
Thank you! |
validates all available curl constants when passed to
curl_setopt.implemeted everything listed on https://www.php.net/manual/en/function.curl-setopt.php - except a few callable-expecting types at the very end. these are a bit more complicated, therefore I left them out for now.
doing similar stuff for
curl_setopt_arraywill be implemented in a followup PR.closes phpstan/phpstan#7951