-
Notifications
You must be signed in to change notification settings - Fork 65
Support unsealed array shapes #169
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
Conversation
ecf47c7
to
6254ad1
Compare
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.
@samsonasik
samsonasik
Dec 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrmajor this cause error on Rector side, that's sealed true make all changes to add ...
which actually not, see
https://github.com/rectorphp/rector-src/actions/runs/3706328433/jobs/6281403238
we forced pin to use 1.5.0 and the issue disappear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, that's actually a bug in __toString()
. I'll provide a fix later today.
@samsonasik
samsonasik
Dec 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrmajor this cause error on Rector side, if this goes to false
for default value, it may reduce the possible error.
that's sealed true make all changes to add ...
which actually not, see
https://github.com/rectorphp/rector-src/actions/runs/3706328433/jobs/6281403238
we forced pin to use 1.5.0 and the issue disappear
This PR adds support for
array{foo: int, ...}
syntax (phpstan/phpstan#8438).