Fix form urlencoded request bodies#20
Merged
abnegate merged 1 commit intoutopia-php:mainfrom Apr 29, 2026
Merged
Conversation
Greptile SummaryThis PR fixes Confidence Score: 5/5Safe to merge — one-line logic fix with a targeted regression test and no side-effects on other content types. No P0 or P1 issues found. The change is minimal, correctly scoped, and the new test validates the exact wire format. Multipart handling is unchanged. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "Fix form urlencoded request bodies" | Re-trigger Greptile |
9eb3afc to
b988865
Compare
loks0n
approved these changes
Apr 28, 2026
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.
Summary
application/x-www-form-urlencodedarray bodies withhttp_build_query()before sendingContext
CURLOPT_POSTFIELDStreats an array body differently from a URL-encoded string. OAuth-style endpoints that expectapplication/x-www-form-urlencodedpayloads require a raw query-string body, for examplegrant_type=client_credentials&client_id=....Test Plan
php -d error_reporting='E_ALL & ~E_DEPRECATED' vendor/bin/phpunit --filter testFormUrlencodedArrayBodyphp -d error_reporting='E_ALL & ~E_DEPRECATED' vendor/bin/phpunit tests/ClientTest.phpvendor/bin/pint --test --config pint.json src/Client.php tests/ClientTest.php