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

Broken HTTP typehints #55150

Closed
mantas-done opened this issue Mar 24, 2025 · 3 comments
Closed

Broken HTTP typehints #55150

mantas-done opened this issue Mar 24, 2025 · 3 comments

Comments

@mantas-done
Copy link

Laravel Version

12.0.3

PHP Version

8.4

Database Driver & Version

No response

Description

e6449da

This change added incomplete typehints, HTTP post method accepts null
Http::post($url, null)

Also it accepts object:
Http::post($url, (object)[])

We use this for PayPal integration and PayPal specifically requires to pass null or an empty object for some endpoints.

Steps To Reproduce

Image

@cosmastech
Copy link
Contributor

Curious: was this not broken prior to the change too?

@mantas-done
Copy link
Author

Yes.
We have a baseline file, probably new typehints changed the error message and it got shown again. The old message was:

Image

@crynobone
Copy link
Member

Hey there, thanks for reporting this issue.

If you notice improper DocBlock, PHPStan, or IDE warnings while using Laravel, do not create a GitHub issue. Instead, please submit a pull request to fix the problem. Also see our contribution guide.

Thanks!

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 a pull request may close this issue.

3 participants