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

PHP 8.2 @mixin UnitEnum annotation in interface has no effect #9841

Closed
halnique opened this issue Sep 3, 2023 · 3 comments
Closed

PHP 8.2 @mixin UnitEnum annotation in interface has no effect #9841

halnique opened this issue Sep 3, 2023 · 3 comments

Comments

@halnique
Copy link

halnique commented Sep 3, 2023

Bug report

Similar to #8550, the enum documented in an interface @mixin annotation, it’s default property (e.g. $name) not found in class that using this interface.
There were no warnings in PHP 8.1.

In interface, @property annotation has no effect, and it cannot include member variables.
I don't know how to get around this problem.

Code snippet that reproduces the problem

https://phpstan.org/r/121d662f-2b81-4ec3-a873-de6ced3715fe

Expected output

No errors!

Did PHPStan help you today? Did it make you happy in any way?

PHPStan is the best tool to develop in PHP with a good feeling!

@ondrejmirtes
Copy link
Member

@halnique
Copy link
Author

halnique commented Sep 3, 2023

Oh, I did not know that the Enum interface was inheritable.
This is the solution.
Thanks!

@halnique halnique closed this as completed Sep 3, 2023
@github-actions
Copy link

github-actions bot commented Oct 5, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants