Skip to content

Conversation

@jaapio
Copy link
Member

@jaapio jaapio commented Nov 11, 2022

Types are no longer parsed by this library. We do now use the phpstan
parser to parse types. Having support for more advanced type definitions
without the burden to support all parser logic.

In this commit I do introduce support for:

  • array shapes
  • constant expressions like integers, strings, and floats
  • constant expressions for enums and class constants
  • Callable support with and without params and return types.

A new set of unittests have been added to ensure everything keeps working as
expected.

Fixes #155
Fixes #173
Refs #157 this pr should be revisted

Types are no longer parsed by this library. We do now use the phpstan
parser to parse types. Having support for more advanced type definitions
without the burden to support all parser logic.

In this commit I do introduce support for:
- array shapes
- constant expressions like integers, strings and floats
- constant expressions for enums and class constants
- Callable support with and without params and return types.

A new set of unittests have been added to ensure everything keeps working as
expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

callable phpdoc is not working without parameter Psalm-like syntax for arrays is not resolved

2 participants