support positional arguments in sprintf() constant format inference#1426
Merged
ondrejmirtes merged 4 commits intophpstan:1.7.xfrom Jun 17, 2022
Merged
support positional arguments in sprintf() constant format inference#1426ondrejmirtes merged 4 commits intophpstan:1.7.xfrom
ondrejmirtes merged 4 commits intophpstan:1.7.xfrom
Conversation
staabm
commented
Jun 15, 2022
Contributor
Author
There was a problem hiding this comment.
3v4l seems to be down/not working atm.. I verified the test-script locally
6805787 to
5a19970
Compare
bd4537c to
21ffa2c
Compare
Contributor
Author
|
Build error seems unrelated |
ondrejmirtes
requested changes
Jun 17, 2022
Member
There was a problem hiding this comment.
%0$s isn't valid, please modify this part of the regex (and a test for this scenario)
%(?:[1-9][0-9]*\$)?
Thanks :)
Contributor
Author
There was a problem hiding this comment.
fixed. instead of changing the suggested regex, I left it as is and if-cased the 0, because otherwise a non-empty-string would have been returned by the followup logic, instead of the default-return-type
2cf716f to
57ae02c
Compare
57ae02c to
43928ed
Compare
43928ed to
37e8918
Compare
Member
|
Thank you! |
Member
|
FYI had to revert this: 82583cf Because of: That shows up when running |
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.
as requested in #1410 (comment)
with this PR we still don't support the whole glory of
sprintf()- but I think we covered most use-cases as of this PR.