Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Support union types #15

Description

@j6s

While reviewing #14 we realized that union types (such as Foo|Bar) are not supported yet.

  • Union types in docblock typehints should be parsed as each of the component
  • Union types in actual type declarations ( https://wiki.php.net/rfc/union_types_v2 ) should be parsed
  • Union types in generics (e.g. Baz<Foo|Bar>) should also be parsed as each component + the wrapper

Activity

  1. bestform commented on Jun 29, 2020

    @bestform

    Keep in mind that this feature will be added in PHP8. As this project requires PHP 7.2 or higher, it either needs to be bumped to PHP8 or the code must reflect this by skipping those cases or it will probably break when running with PHP7 - at least when running the tests while trying to parse the respective test classes.

  2. j6s commented on Jun 30, 2020

    @j6s
    OwnerAuthor

    That I hadn't considered, yeah. For the beginning just supporting it in docblocks would go a long way.

  3. added a commit that references this issue on Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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