Skip to content

@param null | string and other spaced union types not parsed correctly #246

@mohsentm

Description

@mohsentm

JsonMapper does not correctly parse PHPDoc union types when there are spaces around the pipe character (e.g., null | string or string | null). This results in Empty type errors when mapping data to properties, which is a common issue with autogenerated PHP models (such as those generated by OpenAPI Generator). The parser should normalize these annotations and handle spaced union types the same way it handles compact ones like string|null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions