KEMBAR78
[DeadCode] Skip used by get_object_vars() when implements JsonSerializable on RemoveUnusedPromotedPropertyRector by samsonasik · Pull Request #6472 · rectorphp/rector-src · GitHub
Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @uncaught

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit c322032 into main Nov 22, 2024
36 checks passed
@samsonasik samsonasik deleted the skip-with-get-object-vars branch November 22, 2024 13:22
@uncaught
Copy link
Contributor

Oh, thanks for the quick PR!

However, the JsonSerializable implementation was only an example. We also use get_object_vars in other situations 🫣😄

@samsonasik
Copy link
Member Author

well, check JsonSerializable is to ensure it only make sense to not remove it, too avoid too general check, per use case you reported :)

Feel free to provide test (and patch) if the issue persist, to not verify is object type of JsonSerializable

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.

Private property gets removed despite being used by get_object_vars

2 participants