Skip to content

Commit 55885f6

Browse files
committed
Build/Test Tools: Update PHPStan to 2.3.6.
This also updates `phpstan/phpstan-phpunit` to 2.1.2, and regenerates the baselines for the errors PHPStan now reports differently. Developed in WordPress#16042. Follow-up to r65078, r65310. See #65817. git-svn-id: https://develop.svn.wordpress.org/trunk@65537 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0239f9b commit 55885f6

4 files changed

Lines changed: 5 additions & 20 deletions

File tree

‎composer.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
"squizlabs/php_codesniffer": "3.13.5",
5353
"wp-coding-standards/wpcs": "~3.4.1",
5454
"phpcompatibility/phpcompatibility-wp": "~2.1.3",
55-
"phpstan/phpstan": "2.3.5",
56-
"phpstan/phpstan-phpunit": "2.1.1",
55+
"phpstan/phpstan": "2.3.6",
56+
"phpstan/phpstan-phpunit": "2.1.2",
5757
"phpstan/phpstan-strict-rules": "2.1.1",
5858
"yoast/phpunit-polyfills": "^1.1.0"
5959
},

‎tests/phpstan/baselines/assign.propertyType.neon‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ parameters:
3636
-
3737
message: '#^Property WP_Query\:\:\$posts \(array\<int\|WP_Post\>\|null\) does not accept list\<stdClass\>\|null\.$#'
3838
identifier: assign.propertyType
39-
count: 1
39+
count: 2
4040
path: ../../../src/wp-includes/class-wp-query.php
4141
-
4242
message: '#^Property WP_Query\:\:\$posts \(array\<int\|WP_Post\>\|null\) does not accept list\<string\|null\>\.$#'
4343
identifier: assign.propertyType
44-
count: 1
44+
count: 2
4545
path: ../../../src/wp-includes/class-wp-query.php
4646
-
4747
message: '#^Property WP_Rewrite\:\:\$rules \(array\<string\>\) does not accept string\.$#'

‎tests/phpstan/baselines/offsetAccess.notFound.neon‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
parameters:
2020
ignoreErrors:
2121
-
22-
message: '#^Offset float does not exist on list\<float\>\.$#'
22+
message: '#^Offset float\<0\.0, max\> does not exist on list\<float\>\.$#'
2323
identifier: offsetAccess.notFound
2424
count: 1
2525
path: ../../../src/wp-admin/includes/class-wp-site-health.php

‎tests/phpstan/baselines/variable.undefined.neon‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818

1919
parameters:
2020
ignoreErrors:
21-
-
22-
message: '#^Variable \$pagenow might not be defined\.$#'
23-
identifier: variable.undefined
24-
count: 3
25-
path: ../../../src/wp-admin/admin.php
2621
-
2722
message: '#^Variable \$wp_db_version might not be defined\.$#'
2823
identifier: variable.undefined
@@ -693,11 +688,6 @@ parameters:
693688
identifier: variable.undefined
694689
count: 3
695690
path: ../../../src/wp-includes/ms-files.php
696-
-
697-
message: '#^Variable \$current_blog might not be defined\.$#'
698-
identifier: variable.undefined
699-
count: 7
700-
path: ../../../src/wp-includes/ms-settings.php
701691
-
702692
message: '#^Variable \$table_prefix might not be defined\.$#'
703693
identifier: variable.undefined
@@ -708,11 +698,6 @@ parameters:
708698
identifier: variable.undefined
709699
count: 3
710700
path: ../../../src/wp-includes/ms-settings.php
711-
-
712-
message: '#^Variable \$wp_template_path might not be defined\.$#'
713-
identifier: variable.undefined
714-
count: 2
715-
path: ../../../src/wp-includes/template.php
716701
-
717702
message: '#^Variable \$error might not be defined\.$#'
718703
identifier: variable.undefined

0 commit comments

Comments
 (0)