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

v2.x PHPStan extension is incompatible with PHPStan 2 #3124

Open
mortenscheel opened this issue Dec 18, 2024 · 0 comments
Open

v2.x PHPStan extension is incompatible with PHPStan 2 #3124

mortenscheel opened this issue Dec 18, 2024 · 0 comments

Comments

@mortenscheel
Copy link

Hello,

Carbon v2.x is incompatible with PHPStan v2 when using macros.
When encountering a Carbon macro, PHPStan crashes with

Internal error: Class "PHPStan\Reflection\Php\BuiltinMethodReflection" does not exist while analysing file /path/to/file.php

Specifically it's crashing on this line:

$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getReflection');

Is it possible to backport the updated extension from v3.x?

Carbon version: 2.72.5

PHP version: 8.3.14

Thanks!

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

No branches or pull requests

1 participant