Add ConstFetchNode support in array shape#4289
Conversation
ondrejmirtes
left a comment
There was a problem hiding this comment.
I don't want this huge refactoring. I don't think it makes sense to support Foo::* in an array shape key, because the result would no longer be ConstantArrayType, but ArrayType only.
The handling of Foo::BAR in an array shape key needs new code, not reusing of an existing code. For example supporting enums does not make sense there either.
Also, I realized that support for static:: is currently insufficient. It's not going to do what people expect in subclasses. But that's a story for another day.
7d8a318 to
54456c5
Compare
Ok so I tried another way. I still created a method Then I used a simpler version for the ConstFetchNode by
|
|
Thank you. |
Follow phpstan/phpdoc-parser#275
Closes phpstan/phpstan#5773
and
Closes phpstan/phpstan#6989