Skip to content

fix: stdClass is not a universal base class #3052

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

Merged
merged 2 commits into from
May 8, 2024

Conversation

rajyan
Copy link
Contributor

@rajyan rajyan commented May 7, 2024

https://www.php.net/manual/en/class.stdclass.php

I think we can subtract more than stdClass on json_decode when force associative array option is enabled.

@rajyan rajyan force-pushed the fix/object-type-with-stdclass branch from 7f4c7f6 to 8648608 Compare May 7, 2024 23:38

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@rajyan
Copy link
Contributor Author

rajyan commented May 8, 2024

I wanted to test this behavior on NonexistentOffsetInArrayDimFetchRule, but noticed that we cannot subtract StrictMixedType.

@rajyan rajyan marked this pull request as ready for review May 8, 2024 00:16
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 4e5020d into phpstan:1.11.x May 8, 2024
445 of 446 checks passed
@ondrejmirtes
Copy link
Member

Thank you very much!

@rajyan rajyan deleted the fix/object-type-with-stdclass branch May 8, 2024 12:10
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.

None yet

3 participants