Skip to content

Single quote in specific string text in phpdoc is not parsed correctly #7789

Closed
@mvorisek

Description

@mvorisek

Bug report

Please see the demo, the phpdoc should allow " (double quote char) and ' (single quote char) values.

I tried '''' phpdoc type (escape using two double quotes), but it does not work either.

I belive this is a bug. The phpdoc type should parse single quoted string using standard php single quoted string grammar.

Code snippet that reproduces the problem

https://phpstan.org/r/ae89f38f-7968-42f2-8b48-c111183e5778

Expected output

no error

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