Skip to content

Constant anotated with @var is resolved as StringType, not ConstantStringType anymore #5517

@janedbal

Description

@janedbal

Bug report

See snippet, when you remove that var annotation, it properly finds the always-true condition. Imo broken by phpstan/phpstan-src@b932769

Found when upgrading from 0.12.94 to 0.12.96

Code snippet that reproduces the problem

https://phpstan.org/r/b5200efd-e999-4c12-9e7c-9ebc8eb3ee2a

Expected output

Original behaviour

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