Change curl_setopt function signature based on 2nd arg#1719
Merged
ondrejmirtes merged 5 commits intophpstan:1.8.xfrom Sep 20, 2022
Merged
Change curl_setopt function signature based on 2nd arg#1719ondrejmirtes merged 5 commits intophpstan:1.8.xfrom
ondrejmirtes merged 5 commits intophpstan:1.8.xfrom
Conversation
Contributor
Author
|
(lets finish all my other open non-draft PRs before finalizing/discussing this one here. I had a hour of free time.. ;)) |
Member
|
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
Member
|
So nice, right? :) Please rebase and solve the conflict, thanks. |
73bd63e to
0a17bf3
Compare
Member
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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