Skip to content

Psalm-type messing with generics #8473

@MaximJam

Description

@MaximJam

Bug report

Hello,

I've been trying to fix a project after an update, and a third party added psalm annotations to their classes, which caused some generic template analysis to throw errors.

I've read as much as I could find on the subject with no luck, so I'm asking here.

I could not reproduce the exact issue but here is something similar :
Not working

If I just remove the psalm-type, I've got no more errors.
Working

I've read that phpstan will read psalm annotations since both define generics, and I guess I could always stub the 3rd party to make it work, but I'd rather understand where the problem lies.

I'm sorry for the issue if this is expected behavior, I could not find anything going that way.

And I'd also like to thank all of you for the great work at PhpStan, it's hard to tell the amount of time it saved us, but I know it's substantial.

Have a nice day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions