phpstan / phpdoc-parser

Next-gen phpDoc parser with support for intersection types and generics
MIT License
1.36k stars 61 forks source link

Support unsealed array shapes #169

Closed jrmajor closed 1 year ago

jrmajor commented 1 year ago

This PR adds support for array{foo: int, ...} syntax (phpstan/phpstan#8438).

ondrejmirtes commented 1 year ago

Thank you. This is useful so that unsealed array shapes in @psalm-var are not a parse error for PHPStan anymore, but I don't want to take any further action for this. To fully support all possible use-cases, PHPStan would need 3-4 different ConstantArrayType implementations, but right now we only have one.