Skip to content

fix: stdClass is not a universal base class#3052

Merged
ondrejmirtes merged 2 commits intophpstan:1.11.xfrom
rajyan:fix/object-type-with-stdclass
May 8, 2024
Merged

fix: stdClass is not a universal base class#3052
ondrejmirtes merged 2 commits intophpstan:1.11.xfrom
rajyan:fix/object-type-with-stdclass

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
@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
@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.

3 participants