Open marekdedic opened 1 year ago
Not sure if it's possible to support this. It's not standard doccomment.
Yeah, it's not. However, the standards regarding phpDoc are kind of lacking, for example the array<int|string>
syntax is AFAIK also not standardized, yet it is used by many tools....
I'd argue that WordPress is big enough to pay attention to what is used in it (and the plugins and themes follow that), but that's a decision you have to make :)
I'd argue that Wordpress should switch to array shapes currently understood by Slevomat CS, PHPStan, Psalm, and PhpStorm: https://phpstan.org/writing-php-code/phpdoc-types#array-shapes
And I'd agree with you. But I'm not a member of the WordPress core team, just a plugin developer trying to make this all work together :shrug:
Hi, I am using the WordPress style documentation for array fields that go like so:
However, it seems that 8.13 cannot read this - specifically it complains about order of annotation groups and the autofix has a tendency to move things from inside the
{}
outside - breaking the type annotation in the process...Full issue here: https://github.com/skaut/skaut-google-drive-gallery/pull/2044