Skip to content
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

Remove and update extensions to reflect new stub file #182

Merged
merged 31 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
09f5583
Remove has_filter extension
IanDelMar Apr 16, 2023
fd6ef00
Remove current_time extension
IanDelMar Apr 16, 2023
9b7ac75
Remove mysql2date extension
IanDelMar Apr 16, 2023
9a389e7
Remove get_object_taxonomies extension
IanDelMar Apr 16, 2023
40d947d
Remove get_taxonomies extension
IanDelMar Apr 16, 2023
3dfaebc
Adapt get_post extension to new stub file
IanDelMar Apr 16, 2023
d4181ec
Adapt get_comment extension to new stub file
IanDelMar Apr 16, 2023
e1f1ac3
Fix CS
IanDelMar Apr 16, 2023
d15b7e1
Update composer.json
szepeviktor Apr 16, 2023
02b8391
Remove WP_Theme::get()
IanDelMar Apr 19, 2023
0971d67
Remove get_permalink extension
IanDelMar Apr 19, 2023
4dff6a3
Update .travis.yml
szepeviktor Apr 19, 2023
7a9a173
Remove term_exists extension
IanDelMar Apr 20, 2023
773b7f0
Update wp_error parameter extension
IanDelMar Apr 20, 2023
0e7e243
Update GetPostDynamicFunctionReturnTypeExtension.php
IanDelMar Apr 20, 2023
44e8c5d
Fully remove wp_error parameter extension
IanDelMar Apr 20, 2023
5704ba9
Merge get_comment extension into get_post extension
IanDelMar Apr 20, 2023
bd99d58
Remove type specifiying extension and rule for `is_wp_error()`
IanDelMar Apr 21, 2023
fd282a3
Update README.md
IanDelMar Apr 21, 2023
9e90481
Remove echo parameter extension
IanDelMar Apr 21, 2023
33d5d81
Merge branch 'remove-stubfile-fns' of https://github.com/IanDelMar/ph…
IanDelMar Apr 21, 2023
0191253
Remove _get_list_table extension
IanDelMar Apr 27, 2023
72d17a3
Revert "Remove _get_list_table extension"
IanDelMar Jun 16, 2023
62769a2
Update get_post.php
IanDelMar Jul 27, 2023
25da5cb
Fix earlyTerminatingMethodCalls syntax (#173)
mundschenk-at Apr 21, 2023
e8abc32
Remove deprecated instanceof (#183)
IanDelMar Apr 21, 2023
ce4e3d3
Remove deprecated `instanceof` (#184)
IanDelMar Apr 23, 2023
abbf8dd
Remove deprecated `instanceof` (#185)
IanDelMar Apr 23, 2023
3eedadd
Fix CS (#186)
szepeviktor Apr 23, 2023
de4be27
Fix _get_list_table extension (#190)
IanDelMar Jun 16, 2023
886a066
Revert "Update composer.json"
IanDelMar Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ Please see [WooCommerce Stubs](https://github.com/php-stubs/woocommerce-stubs)

- Makes it possible to run PHPStan on WordPress plugins and themes
- Loads [`php-stubs/wordpress-stubs`](https://github.com/php-stubs/wordpress-stubs) package
- Provides dynamic return type extensions for many core functions
- Provides dynamic return type extensions for functions that are not covered in [`php-stubs/wordpress-stubs`](https://github.com/php-stubs/wordpress-stubs)
IanDelMar marked this conversation as resolved.
Show resolved Hide resolved
- Defines some core constants
- Handles special functions and classes e.g. `is_wp_error()`
- Validates the optional docblock that precedes a call to `apply_filters()` and treats the type of its first `@param` as certain

### Usage of an `apply_filters()` docblock
Expand Down
5 changes: 0 additions & 5 deletions extension.neon
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
services:
-
class: SzepeViktor\PHPStan\WordPress\IsWpErrorFunctionTypeSpecifyingExtension
tags:
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
-
class: SzepeViktor\PHPStan\WordPress\WpThemeMagicPropertiesClassReflectionExtension
tags:
Expand Down Expand Up @@ -70,7 +66,6 @@ services:
rules:
- SzepeViktor\PHPStan\WordPress\HookCallbackRule
- SzepeViktor\PHPStan\WordPress\HookDocsRule
- SzepeViktor\PHPStan\WordPress\IsWpErrorRule
parameters:
bootstrapFiles:
- ../../php-stubs/wordpress-stubs/wordpress-stubs.php
Expand Down
47 changes: 0 additions & 47 deletions src/IsWpErrorFunctionTypeSpecifyingExtension.php

This file was deleted.

92 changes: 0 additions & 92 deletions src/IsWpErrorRule.php

This file was deleted.

60 changes: 0 additions & 60 deletions tests/IsWpErrorRuleTest.php

This file was deleted.

2 changes: 2 additions & 0 deletions tests/data/get_post.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
declare(strict_types=1);

namespace SzepeViktor\PHPStan\WordPress\Tests;
use WP_Error;

use function is_wp_error;
use function PHPStan\Testing\assertType;

/** @var \WP_Post $wpPostType */
Expand Down
30 changes: 0 additions & 30 deletions tests/data/is_wp_error.php

This file was deleted.