Skip to content

Commit

Permalink
Add stubs for WP 6.5 (#167)
Browse files Browse the repository at this point in the history
* bump johnpbloch/wordpress

* Update functionMap.php

* update stubs for wp 6.5
  • Loading branch information
IanDelMar authored Apr 14, 2024
1 parent acdb076 commit 04e33fa
Show file tree
Hide file tree
Showing 3 changed files with 5,363 additions and 588 deletions.
4 changes: 1 addition & 3 deletions functionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$cronArgsType = 'list<mixed>';
$wpWidgetRssFormArgsType = 'array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int}';
$wpWidgetRssFormInputsType = 'array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool}';
$filesystemDirlistReturnType = "false|array<string, array{name: string, perms: string, permsn: string, owner: string|false, size: int|string|false, lastmodunix: int|string|false, lastmod: string|false, time: string|false, type: 'f'|'d'|'l', group?: string|false, number?: int|string|false, files?: array|false}>";
$filesystemDirlistReturnType = "false|array<string, array{name: string, perms: string, permsn: string, owner: string|false, size: int|string|false, lastmodunix: int|string|false, lastmod: string|false, time: string|false, type: 'f'|'d'|'l', group: string|false, number: int|string|false, files?: array|false}>";

/**
* This array is in the same format as the function map array in PHPStan:
Expand Down Expand Up @@ -41,8 +41,6 @@
'WP_Http::head' => [$httpReturnType],
'WP_Http::post' => [$httpReturnType],
'WP_Http::request' => [$httpReturnType],
'WP_List_Table::display_tablenav' => ['void', 'which' => '"top"|"bottom"'],
'WP_List_Table::pagination' => ['void', 'which' => '"top"|"bottom"'],
'WP_List_Table::set_pagination_args' => ['void', 'args' => 'array{total_items?: int, total_pages?: int, per_page?: int}'],
'wp_next_scheduled' => [null, 'args' => $cronArgsType],
'WP_Query::have_posts' => [null, '@phpstan-impure' => ''],
Expand Down
2 changes: 1 addition & 1 deletion source/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-sodium": "*",
"johnpbloch/wordpress": "6.4.3"
"johnpbloch/wordpress": "6.5.0"
},
"minimum-stability": "stable",
"config": {
Expand Down
Loading

0 comments on commit 04e33fa

Please sign in to comment.