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
[PHP 8.1] Access to an undefined property BackedEnum::$name #6385
Comments
@ondrejmirtes What's the best way to solve this? Adding it to a stub somewhere? I can provide the PR right-away. |
Yeah, this one is funny :) UnitEnum and BackedEnum are actually the only interfaces ever that contain properties. And what's worse, they aren't even actually enums. Which is breaking some logic down somewhere. I'm gonna look into it. |
Here: Roave/BetterReflection#971 Gonna integrate it in my fork right away. |
Fixed: phpstan/phpstan-src@67d3a88 |
Thank you ⚡ |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
Given that #6048 was closed (and updated with mentions about Enum's being supported in 1.3) I thought I was good to create a new issue for this.
Somehow PHPStan doesn't understand that you can access
$name
onBackedEnum
.Code snippet that reproduces the problem
https://phpstan.org/r/5b07429c-74f8-40b1-9e4f-68cd3e20f839
Expected output
No error, as the code just works on PHP 8.1
The text was updated successfully, but these errors were encountered: