-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add stubs for WP 6.5 #167
Add stubs for WP 6.5 #167
Conversation
Thank you Ian! |
You know what?! |
Sorry, didn't see this before. Anything you still want me to do? |
No. Everything is released. |
@IanDelMar Thanks for working on this! Would you mind creating core trac tickets for those two functions? |
@swissspidy Feel free to do it on my behalf 🙈 |
After all Pascal is our secret connection to WordPress! |
So I just looked into those. Unfortunately, this non-standard phpdoc format for arrays is part of the WordPress coding standards. It's not limited to these two function; just search the code base for |
Yes. Please have core add ALL of our tags in functionMap. |
The visitor is aware of this notation for arrays! However, according to the WordPress coding standards, it should be indented by 4 spaces or a multiple thereof. This is what the visitor is seeking but can't find for these two functions. Therefore, it should be fixed in WP core.
And in many of these cases, the phpstan tag is added correctly. |
Oh, ok! Let me take another look next week then |
Alright, https://core.trac.wordpress.org/changeset/58037 should fix this |
These haven't made it into core yet, right? |
That‘s in core :) just not in a published release. That will be WP 6.6, due out this summer |
This pull request updates the stubs to WordPress 6.5.
Changes to functionMap.php:
WP_List_Table::display_tablenav
andWP_List_Table::pagination
. The visitor now adds these PHPStan tags without relying onfunctionMap.php
.?
) for the return type ofWP_Filesystem_*::dirlist()
in accordance with the description in the documentation.Notes:
WP_Filesystem_*::dirlist()
: There are now two@phpstan-return
, one added by the visitor using@type
and one previously added viafunctionMap.php
. There are two issues: the details provided by the new tag are slightly reduced (seetype
key), which should not be problematic from my perspective. Additionally, the array key is now specified as int|string, which I believe is incorrect; it should be string. Depending on how PHPStan handles duplicate entries, which I'm unsure of but assume to be based on the last entry, I would recommend retaining the PHPStan information fromfunctionMap.php
.WP_Font_Face::generate_and_print()
: The visitor no longer includes additions stemming from@type
. I think this is because we cannot handlearray[][]
. Isarray[][]
a valid syntax?wp_get_avif_info()
: The visitor no longer includes additions stemming from@type
, possibly due to incorrect indentation. This should be addressed in the core.wp_enqueue_script_module()
: See towp_get_avif_info()
.Concerning the idea of ceasing to add additional tags if a tag with the same name is already present (#163):