Interface used by more than one class @phpstan-require-extends #10790
Unanswered
AnjaLiebermann
asked this question in
Support
Replies: 1 comment 4 replies
-
Can you show your situation on phpstan.org/try?
This is expected because a class cannot have two different parents. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just upgraded to php 8.2 and phpstan complains about
Access to an undefined property
in an interface.With one of my interfaces I could solve the problem fine with
@phpstan-require-extends Model
, but I have two more interfaces, which are not used by one model, but by two models each.Now I get:
PHPDoc tag @phpstan-require-extends can only be used once.
Having one Interface used by more than one class is not unusual. Is there a solution for this?
Beta Was this translation helpful? Give feedback.
All reactions