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 18 commits
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TravisCI configuration for szepeviktor/phpstan-wordpress

if: "branch = master"
if: "branch IN (master, 2.x)"

language: "php"
os:
Expand Down
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": "^7.2 || ^8.0",
"php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0",
"php-stubs/wordpress-stubs": "dev-master",
"phpstan/phpstan": "^1.10.0",
"symfony/polyfill-php73": "^1.12.0"
},
Expand Down
45 changes: 0 additions & 45 deletions extension.neon
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
services:
-
class: SzepeViktor\PHPStan\WordPress\WpThemeGetDynamicMethodReturnTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\IsWpErrorFunctionTypeSpecifyingExtension
tags:
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
-
class: SzepeViktor\PHPStan\WordPress\WpThemeMagicPropertiesClassReflectionExtension
tags:
Expand All @@ -15,10 +7,6 @@ services:
class: SzepeViktor\PHPStan\WordPress\EchoKeyDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\GetPermalinkDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\GetListTableDynamicFunctionReturnTypeExtension
tags:
Expand Down Expand Up @@ -47,34 +35,10 @@ services:
class: SzepeViktor\PHPStan\WordPress\GetSitesDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\GetTaxonomiesDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\GetObjectTaxonomiesDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\GetCommentDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\HasFilterDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\ShortcodeAttsDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\MySQL2DateDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\CurrentTimeDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\ApplyFiltersDynamicFunctionReturnTypeExtension
tags:
Expand All @@ -83,14 +47,6 @@ services:
class: SzepeViktor\PHPStan\WordPress\EchoParameterDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\WPErrorParameterDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\TermExistsDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: SzepeViktor\PHPStan\WordPress\WpParseUrlFunctionDynamicReturnTypeExtension
tags:
Expand All @@ -110,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
55 changes: 0 additions & 55 deletions src/CurrentTimeDynamicFunctionReturnTypeExtension.php

This file was deleted.

81 changes: 0 additions & 81 deletions src/GetCommentDynamicFunctionReturnTypeExtension.php

This file was deleted.

65 changes: 0 additions & 65 deletions src/GetObjectTaxonomiesDynamicFunctionReturnTypeExtension.php

This file was deleted.

57 changes: 0 additions & 57 deletions src/GetPermalinkDynamicFunctionReturnTypeExtension.php

This file was deleted.

Loading