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

Update PHPStan level to 9 (maybe) #1211

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
parameters:
level: 8
level: 9
treatPhpDocTypesAsCertain: false
paths:
- load.php
Expand Down Expand Up @@ -61,3 +61,12 @@ parameters:
-
message: '/Cannot cast .+ to string/'
path: tests/*
-
message: '/Cannot access offset .+ on mixed\./'
path: tests/*
-
message: '/Argument of an invalid type mixed supplied for foreach, only iterables are supported./'
path: tests/*
-
message: '/Property .+ does not accept mixed\./'
path: tests/*
3 changes: 2 additions & 1 deletion tests/plugins/webp-uploads/helper-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,8 @@ public function test_webp_uploads_in_frontend_body_without_wp_query(): void {

public function test_webp_uploads_in_frontend_body_with_feed(): void {
$this->mock_empty_action( 'template_redirect' );
$GLOBALS['wp_query']->is_feed = true;
global $wp_query;
$wp_query->is_feed = true;

$this->assertFalse( webp_uploads_in_frontend_body() );
}
Expand Down
Loading