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

Simplify PHPStan extension #3065

Merged
merged 7 commits into from
Aug 13, 2024

Conversation

ondrejmirtes
Copy link
Contributor

221 additions and 925 deletions.

Nice, right? :) The main motivation for me to contribute this is for Carbon to stop using non-public facing PHPStan classes like BuiltinMethodReflection (which will be removed in PHPStan 2.0).

Thanks to ClosureTypeFactory, which allows us to create useful PHPStan Reflection objects out of Closure objects, this greatly simplified the PHPStan extension related to macros.

ClosureTypeFactory has been contributed to PHPStan by Can Vural, to support similar macros analysis in Larastan (Laravel), more than 2 years ago.

I hope you like this.

@ondrejmirtes
Copy link
Contributor Author

I can bring back tests/PHPStan/MacroTest.php in some form if you'd want.

@ondrejmirtes
Copy link
Contributor Author

I'm now waiting for your feedback before finalizing this PR.

ondrejmirtes and others added 4 commits August 9, 2024 14:14
Co-authored-by: Kyle <kylekatarnls@users.noreply.github.com>
Co-authored-by: Kyle <kylekatarnls@users.noreply.github.com>
Co-authored-by: Kyle <kylekatarnls@users.noreply.github.com>
@ondrejmirtes
Copy link
Contributor Author

And we're green now! 👍

Please squash the commits on merge, thank you.

@kylekatarnls
Copy link
Collaborator

Thank you 🙏 💟

@kylekatarnls kylekatarnls merged commit 9400f34 into briannesbitt:master Aug 13, 2024
26 checks passed
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.

2 participants