Skip to content

Commit c02c347

Browse files
authored
Bump Phan to 5.5.2 (#45513)
1 parent bc5efcb commit c02c347

File tree

40 files changed

+116
-65
lines changed

40 files changed

+116
-65
lines changed

.phan/config.base.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,6 @@ function make_phan_config( $dir, $options = array() ) {
196196
array(
197197
// WordPress coding standards do not allow the `?:` operator.
198198
'PhanPluginDuplicateConditionalTernaryDuplication',
199-
// These two generate hundreds of false positives: https://github.com/phan/phan/issues/5070
200-
// @todo: Remove these suppressions when Phan >5.5.1 is released
201-
'PhanAccessMethodProtected',
202-
'PhanAccessPropertyProtected',
203199
),
204200
$options['unsuppress_issue_types']
205201
),

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"automattic/jetpack-phan-plugins": "@dev",
1313
"automattic/jetpack-phpcs-filter": "@dev",
1414
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
15-
"phan/phan": "5.5.1",
15+
"phan/phan": "5.5.2",
1616
"php-parallel-lint/php-parallel-lint": "^1.4.0",
1717
"php-stubs/woocommerce-stubs": ">=8.7",
1818
"php-stubs/wordpress-stubs": ">=6.7",

composer.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: changed
3+
Comment: Update to Phan 5.5.2.
4+
5+

projects/packages/analyzer/src/class-declarations.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public function scan_dir( $root, $exclude = array() ) {
5050
$inner_iterator = new \RecursiveDirectoryIterator( $root, \RecursiveDirectoryIterator::SKIP_DOTS );
5151

5252
$iterator = new \RecursiveIteratorIterator(
53-
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal -- Phan is confused; resolved in Phan >5.5.1. $inner_iterator is RecursiveDirectoryIterator, which implements RecursiveIterator
5453
new \RecursiveCallbackFilterIterator( $inner_iterator, $filter )
5554
);
5655

projects/packages/analyzer/src/class-invocations.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public function scan_dir( $root, $exclude = array() ) {
4646
$inner_iterator = new \RecursiveDirectoryIterator( $root, \RecursiveDirectoryIterator::SKIP_DOTS );
4747

4848
$iterator = new \RecursiveIteratorIterator(
49-
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal -- Phan is confused; resolved in Phan >5.5.1. $inner_iterator is RecursiveDirectoryIterator, which implements RecursiveIterator
5049
new \RecursiveCallbackFilterIterator( $inner_iterator, $filter )
5150
);
5251

projects/packages/analyzer/src/diff-generator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ static function cleanup() {
8282

8383
static function rm($folder) {
8484
$iter = new \RecursiveIteratorIterator(
85-
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal -- Phan is confused; resolved in Phan >5.5.1.
8685
new \RecursiveDirectoryIterator( escapeshellarg( $folder ), \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS ),
8786
\RecursiveIteratorIterator::CHILD_FIRST
8887
);

projects/packages/connection/.phan/baseline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
return [
1111
// # Issue statistics:
12-
// PhanTypeMismatchArgument : 50+ occurrences
12+
// PhanTypeMismatchArgument : 45+ occurrences
1313
// PhanPluginDuplicateConditionalNullCoalescing : 15+ occurrences
1414
// PhanTypeMismatchReturn : 15+ occurrences
1515
// PhanTypeMismatchPropertyProbablyReal : 9 occurrences
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: changed
3+
Comment: Update to Phan 5.5.2.
4+
5+

projects/packages/forms/.phan/baseline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
// PhanTypeMismatchReturnProbablyReal : 8 occurrences
1616
// PhanTypeMismatchArgumentProbablyReal : 6 occurrences
1717
// PhanPluginDuplicateAdjacentStatement : 3 occurrences
18+
// PhanPluginRedundantAssignment : 2 occurrences
1819
// PhanTypeConversionFromArray : 2 occurrences
1920
// PhanTypeMismatchReturn : 2 occurrences
2021
// PhanDeprecatedClass : 1 occurrence
2122
// PhanPluginMixedKeyNoKey : 1 occurrence
22-
// PhanPluginRedundantAssignment : 1 occurrence
2323
// PhanPossiblyNullTypeMismatchProperty : 1 occurrence
2424
// PhanTypeArraySuspiciousNullable : 1 occurrence
2525
// PhanTypeMismatchReturnNullable : 1 occurrence

0 commit comments

Comments
 (0)