Skip to content

@phpstan-assert does not work with value-of, null and enum template asserting #13282

@neontsun

Description

@neontsun

Bug report

Asserting correctly work with value-of, but null|value-of always dumped null type

Code snippet that reproduces the problem

https://phpstan.org/r/82df4881-f73a-489d-9fba-e5e3d051a552

Expected output

null|'foo'|'bar'

Did PHPStan help you today? Did it make you happy in any way?

all the time ♥️

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions