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

Prevent unnecessary calls into reflection from JSON extensions #2994

Merged
merged 1 commit into from Mar 27, 2024

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Mar 27, 2024

In todays debugging session I realized that the json throw extensions call into reflection even for non json_* calls.
accidentally spotted while working on Roave/BetterReflection#1415

move the cheaper check in front to prevent this unnecessary reflection stuff.

see

grafik

I looked arround for similar problems in other extensions but could not see additional ones.

@ondrejmirtes ondrejmirtes merged commit fd2e0a6 into phpstan:1.10.x Mar 27, 2024
174 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@staabm staabm deleted the less-reflection branch March 27, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants