Skip to content

PHPStan fails to fallback to plain PHPDoc annotation when erroring in Psalm specific annotation #3723

@ste93cry

Description

@ste93cry

Bug report

The callable-string type is not supported by PHPStan, but it is by Psalm. When the first tries to read the annotation, I think that some internal error happens and an error stating that the parameter has no value type specified is reported. Since there is a plain @param annotation above, I would at least expect PHPStan to fallback to read it. I'm not sure about how much difficult it would be to implement support for callable-string, but if you can give me some advice I may try to open a PR

Code snippet that reproduces the problem

https://phpstan.org/r/ef4e5af0-13a4-4524-a45c-e3ddacef140c

Expected output

No error should be reported

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions