wordpress-stubs icon indicating copy to clipboard operation
wordpress-stubs copied to clipboard

@since comments removed, some @param missing

Open kkmuffme opened this issue 1 year ago • 6 comments

https://github.com/php-stubs/wordpress-stubs/pull/222 and https://github.com/php-stubs/wordpress-stubs/pull/243/files

We used a custom phpstan plugin that used the @since info, but that has been removed with that PR.

In general, I would strongly advice against cosmetic changes to visitors/generators since a) the size of the stubs file is completely irrelevant for phpstan/psalm, since the stubs we use internally in psalm are much bigger in size and it makes literally no difference in performance b) it just causes issues for some users and does not provide a real benefit, does it?

e.g. https://github.com/php-stubs/wordpress-stubs/pull/243/files#diff-4dc94858ed12d457b90cbe75a4151de2b69d60a4693fc574a0bf8d4b71923f31L72164 this shouldn't be removed, should it?

kkmuffme avatar Oct 10 '24 11:10 kkmuffme

@kkmuffme Thank you!! I like your since tag usage.

@IanDelMar Please confirm that we have a problem.

szepeviktor avatar Oct 10 '24 11:10 szepeviktor

this shouldn't be removed, should it?

@johnbillion This is a core bug. No docblock for get_transient_key: /* Can you fix it?

szepeviktor avatar Oct 10 '24 11:10 szepeviktor

https://core.trac.wordpress.org/changeset/59203

johnbillion avatar Oct 10 '24 11:10 johnbillion

The fastest guy in town!

szepeviktor avatar Oct 10 '24 11:10 szepeviktor

https://core.trac.wordpress.org/changeset/59203

This should be resolved then. Valid docBlocks have not been removed. But does that mean that PHPStan uses information from non-docBlocks?

IanDelMar avatar Oct 10 '24 12:10 IanDelMar

But does that mean that PHPStan uses information from non-docBlocks?

It does not by default, but it can - since anybody can write her own plugin.

kkmuffme avatar Oct 10 '24 14:10 kkmuffme