-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
PHPStan interface mismatch #2887
Comments
In the reversal commit phpstan/phpstan-src@d0c0938 of phpstan/phpstan-src@ad6703d the nullable types were removed. before: BuiltinMethodReflection::getReflection(): ?ReflectionMethod after: BuiltinMethodReflection::getReflection(): ReflectionMethod Not sure if this was intended. |
Because extending the macro class was the only way to support properly Carbon macro, even some patches in PHPStan updates can be breaking changes it and it's hard to be compatible with new version without dropping the previous versions (which if we proceed to fast also raises complains). I'm open to pull-request that would fix this while still supporting PHPStan from 1.10.20 to 1.10.43. |
Side note to people adding comments/reactions not helping fixing the issue. As a open-source provided to you for free, there is no obligation for anyone to immediately jump and fix something. Mostly if the bug was introduced by another library, and mostly if it's not a core feature. Carbon core feature is enhancing All you have via OSS out of the box is quite a miracle, but it's still not a reason to expect everything you need to get done by someone else. If you want it, you can get your hands dirty and craft the pull-request. |
See comment: phpstan/phpstan-src@d0c0938#r133136268
|
Hello, I won't personally invest time in this. If this get removed with no alternative and no one proposed another way to support analysis for the macro methods, then we'll just remove the PHPStan extension from Carbon, and we'll delegate that to whoever is interested in building a library for that. I have to be a bit picky with what we support because every piece asked/added even when it's done by another volunteer contributor typically ends with maintenance burden on core team. |
@kylekatarnls Is it viable to extract this functionality into a separate package? This way it won't affect the core package and maintenance could (or could not) progress separately. I'm not too much into the PHPStan internals and don't know, if this must reside in the |
Yes actually that's the path I should have taken from the beginning because having it inside is adding constraint on version supported. With an external package, it could have more flexibility and even fix support for previously released version of both Carbon and PHPStan. |
Closing as fixed (temporarily) via phpstan/phpstan-src#2762 |
Hello,
Running PHPStan on my project yields the following error:
Carbon: 2.71.0
PHPStan 1.10.43
Thanks!
The text was updated successfully, but these errors were encountered: