Skip to content

Conversation

@hrach
Copy link
Member

@hrach hrach commented Oct 9, 2024

This is the first part for #521: adoption of PHPStan's PhpDocParser.
For 5.0 I do not plan to introduce any more parsing features, but this should at least provide some validation consistency.

New behavior:

  • [new] When the type is not simple enough -> exception
  • [new] Understands (parser as a simple array) array shapes
  • [new] Understands (parses as a simple object) object shapes
  • Supports union & intersection types
  • Parser all previously supported types
  • Prases nullability in both forms (?, |null)
  • Removes support for scalar type (BC break!)

@hrach
Copy link
Member Author

hrach commented Oct 9, 2024

cc @mabar

@hrach hrach added this to the v5.0 milestone Oct 9, 2024
@hrach hrach enabled auto-merge October 9, 2024 22:34
@hrach hrach merged commit f83c99e into main Oct 9, 2024
@hrach hrach deleted the phpdoc-parser branch October 9, 2024 22:34
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.

2 participants