psalm icon indicating copy to clipboard operation
psalm copied to clipboard

MissingOverrideAttribute false positive with traits used by child classes

Open pilif opened this issue 9 months ago • 3 comments

https://psalm.dev/r/70ba038824

If you do what psalm says you're supposed to do and add the Override attribute to the trait method, you will create invalid code that PHP refuses to run (and psalm also flags as an error).

I think B should be totally free to import its own copy of the Foo trait.

pilif avatar May 21 '24 09:05 pilif