Skip to content
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

fix: empty body requests not converted to objects #65

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

jayanratna
Copy link
Collaborator

This PR fixes an issue where POST requests that have an empty body, such as action requests, do not get json_encode to an empty object. To fix this issue, now all PHP arrays that are request parameters are casted to an object before being encoded as JSON.

This PR also updates the mockClient in the test suite to ensure PHP arrays are properly converted to JSON.

@jayanratna jayanratna merged commit 50a554d into main Jan 1, 2025
4 checks passed
@jayanratna jayanratna deleted the fix-empty-body-requests branch January 1, 2025 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants