klesun / deep-assoc-completion

A phpstorm plugin for associative array key typing and completion
Other
267 stars 17 forks source link

Psalm array, allow union types? #182

Closed RobinRadic closed 3 years ago

RobinRadic commented 3 years ago

Can this be made possible? step: array|string image

I couldn't find it in the Psalm spec though

klesun commented 3 years ago

Hm, it's not shown in the preview popup (popup shows only the first union type to show up faster), but plugin does understand that step is a union: image

Do you want me to patch plugin to make all union types show in the popup when they come from PSALM?

RobinRadic commented 3 years ago

Yeah that'd be great. So it shows like the right side of this popup

image

RobinRadic commented 3 years ago

Yeah that'd be great. So it shows like image

klesun commented 3 years ago

Ok. Not sure when I'll get to it, but adding to my todo list.

klesun commented 3 years ago

Funny enough, when you call the function union does show up: image

So it's just a small inconsistency, should be easy to fix.

klesun commented 3 years ago

Released in 2021.03.26.001

image

RobinRadic commented 3 years ago

@klesun awesome as always :kissing_heart: