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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a really obscure case where this is breaking. For users on PHP < 7,
\call_user_func_array
returns the original value of$method
(i.e. before we do$method = \strtolower($method)
on line 198), but this change will change it to lower case it. Since$this->defaultOptions
is a potentially-user-defined callback we can't be 100% certain this won't break somebody, but this would only happen in an instance where somebody was introducing a non-lower-cased verb into our request infrastructure (custom requests?)I think this case is unlikely but maybe it would be better to postpone this to the major?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
custom requests are only available on the beta SDKs, not the GA ones - so we should be good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately you can initialize
StripeClient
orApiRequestor
directly and call->request
(happens in the wild). I don't think we ever documented this though, so it's probably fine?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough, will close this out and this can go in the next month's major release