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

[12.x] Fix PendingRequest typehints for post, patch, put, delete #54998

Open
wants to merge 2 commits into
base: 12.x
Choose a base branch
from

Conversation

cosmastech
Copy link
Contributor

@cosmastech cosmastech commented Mar 12, 2025

We can actually pass anything that is JsonSerializable OR Arrayable here.

If the body type is `json`, we'll convert it in `parseHttpOptions` image

I have also modified the existing test cases so they confirm that all of these methods accept JsonSerializable or Arrayable as the $data param

@cosmastech
Copy link
Contributor Author

cosmastech commented Mar 12, 2025

Here we can see that it works just fine:

image

But is indicating a static analysis error.


After the change:

image

@cosmastech cosmastech changed the title [12.x] Fix PendingRequest::post() typehints [12.x] Fix PendingRequest typehints for post, patch, put, delete Mar 12, 2025
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.

1 participant