-
-
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
v2.x PHPStan extension is incompatible with PHPStan 2 #3124
Comments
This would be really helpful for us as well - I did have a look at whether I could raise a PR but can't make head nor tail of what it's trying to do! |
Hello, Carbon 2.x is no longer supported. With a very limited work force, I'm focusing on 3.x version (released for ~1 year) and shaping what 4.x would be. I cannot afford to support (review, test, maintain) new features/versions supports added in 2.x branch. However if you cannot upgrade to Carbon 3 and need it, you can still try to add <?php
namespace Carbon\PHPStan;
final class Macro extends LazyMacro
{
} |
Thanks @kylekatarnls I'll give it a try when I have time. If anyone else gets it to work before, it would be nice if you could share a fork (assuming it won't be merged here). |
I would still discourage forking, you wouldn't then benefit from security updates that can still happen on 2.x branch. Instead it could be achieved with just some extra bootstrap files to load a custom |
Hello,
Carbon v2.x is incompatible with PHPStan v2 when using macros.
When encountering a Carbon macro, PHPStan crashes with
Specifically it's crashing on this line:
Carbon/src/Carbon/PHPStan/Macro.php
Line 20 in 4df0fdd
Is it possible to backport the updated extension from v3.x?
Carbon version: 2.72.5
PHP version: 8.3.14
Thanks!
The text was updated successfully, but these errors were encountered: