Skip to content

[Deprecation] Legacy nullable  #184

Open
@jaapio

Description

@jaapio

In early versions of this library, we did support the native nullable types of PHP. (e.g ?string).

The new version of our parser based on phpstan/phpdoc-parser does not support this properly. The main reason is because it might lead to non-obvious notations in situations where union types are used. ?string|int is equal to null|string|int. There is no difference between a null for a string or int.

It is easy to overlook the ?. And since PHP does have native union type support that also errors with this legacy notation it's better to move away from this format.

Dropping this support will help us to remove some complex parsing form our code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions