Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/advanced type support #175

Merged
merged 2 commits into from
Nov 11, 2022
Merged

Feature/advanced type support #175

merged 2 commits into from
Nov 11, 2022

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