WIP: Move several extensions to WP stubs#235
Merged
szepeviktor merged 30 commits intoszepeviktor:2.xfrom Oct 9, 2024
Merged
Conversation
Owner
|
All right. |
Contributor
Author
Although it may not seem like it, there isn't actually much to review. This PR removes some of the extensions that have been ported to WP stubs. The remainder is simply an import of recent changes (from the last two months) in the master branch. |
Merged
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request syncs the 2.x branch with the master branch and removes extensions whose functionality has already been implemented or is about to be implemented by php-stubs/wordpress-stubs, or is no longer needed or is incorrect:
EchoKeyDynamicFunctionReturnTypeExtensionGetApprovedCommentsDynamicFunctionReturnTypeExtensionGetListTableDynamicFunctionReturnTypeExtensionGetPostDynamicFunctionReturnTypeExtensionGetPostsDynamicFunctionReturnTypeExtensionGetSitesDynamicFunctionReturnTypeExtensionGetTermsDynamicFunctionReturnTypeExtensionWpDieDynamicFunctionReturnTypeExtensionWpThemeMagicPropertiesClassReflectionExtensionEchoKeyDynamicFunctionReturnTypeExtension
the_title_attribute(),wp_dropdown_languages(),wp_get_archives(),wp_list_bookmarks(),wp_list_categories(), andwp_list_pages()have been transferred to php-stubs/wordpress-stubs.wp_dropdown_categories(),wp_dropdown_pages(),wp_dropdown_users(), andwp_link_pages()always return a string as documented, and hence are not included in any PR porting functionality to php-stubs/wordpress-stubs.$argsparameter ofget_search_form(),wp_list_authors(),wp_list_comments(),wp_list_users(),wp_login_form(), andwp_page_menu()is filterable, and thus the value of$args['echo']is unknown. Therefore, these were excluded from the functionality ported to php-stubs/wordpress-stubs.RedirectCanonicalDynamicFunctionReturnTypeExtension
Starting from PHPStan 1.10.49, void types, including void in unions, are transformed into null. This extension is no longer needed.
Related
PRs implementing the functionality in php-stubs/wordpress-stubs
To Do
EchoKeyDynamicFunctionReturnTypeExtensioncan be implemented in WP stubsGetListTableDynamicFunctionReturnTypeExtensioncan be implemented in WP stubsGetPostDynamicFunctionReturnTypeExtensioncan be implemented in WP stubsRedirectCanonicalDynamicFunctionReturnTypeExtensioncan be implemented in WP stubsShortcodeAttsDynamicFunctionReturnTypeExtensioncan be implemented in WP stubsStringOrArrayDynamicFunctionReturnTypeExtensioncan be implemented in WP stubsWpDieDynamicFunctionReturnTypeExtensioncan be implemented in WP stubsWpThemeMagicPropertiesClassReflectionExtensioncan be implemented in WP stubsphp-stubs/wordpress-stubsversion incomposer.jsonto the first released version that includes all the functionality of the removed extensions