class_exists( PHPUnit_TextUI_Command::class ) ? [] : [ '.phan/stubs/phpunit4.php' ],
class_exists( ProfilerExcimer::class ) ? [] : [ '.phan/stubs/excimer.php' ],
[
- 'maintenance/7zip.inc',
'maintenance/cleanupTable.inc',
'maintenance/CodeCleanerGlobalsPass.inc',
'maintenance/commandLine.inc',
);
$cfg['autoload_internal_extension_signatures'] = [
+ 'imagick' => '.phan/internal_stubs/imagick.phan_php',
'memcached' => '.phan/internal_stubs/memcached.phan_php',
'oci8' => '.phan/internal_stubs/oci8.phan_php',
+ 'pcntl' => '.phan/internal_stubs/pcntl.phan_php',
+ 'redis' => '.phan/internal_stubs/redis.phan_php',
+ 'sockets' => '.phan/internal_stubs/sockets.phan_php',
'sqlsrv' => '.phan/internal_stubs/sqlsrv.phan_php',
'tideways' => '.phan/internal_stubs/tideways.phan_php',
];
];
$cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [
- // approximate error count: 18
- "PhanAccessMethodInternal",
- // approximate error count: 17
- "PhanCommentParamOnEmptyParamList",
- // approximate error count: 29
- "PhanCommentParamWithoutRealParam",
- // approximate error count: 2
- "PhanCompatibleNegativeStringOffset",
- // approximate error count: 21
- "PhanParamReqAfterOpt",
- // approximate error count: 26
- "PhanParamSignatureMismatch",
- // approximate error count: 4
- "PhanParamSignatureMismatchInternal",
- // approximate error count: 127
- "PhanParamTooMany",
- // approximate error count: 2
- "PhanTraitParentReference",
- // approximate error count: 30
- "PhanTypeArraySuspicious",
- // approximate error count: 27
- "PhanTypeArraySuspiciousNullable",
- // approximate error count: 26
- "PhanTypeComparisonFromArray",
- // approximate error count: 63
- "PhanTypeInvalidDimOffset",
- // approximate error count: 7
- "PhanTypeInvalidLeftOperandOfIntegerOp",
- // approximate error count: 2
- "PhanTypeInvalidRightOperandOfIntegerOp",
- // approximate error count: 154
- "PhanTypeMismatchArgument",
- // approximate error count: 27
- "PhanTypeMismatchArgumentInternal",
- // approximate error count: 2
- "PhanTypeMismatchDimEmpty",
- // approximate error count: 27
- "PhanTypeMismatchDimFetch",
- // approximate error count: 10
- "PhanTypeMismatchForeach",
- // approximate error count: 77
- "PhanTypeMismatchProperty",
- // approximate error count: 84
- "PhanTypeMismatchReturn",
- // approximate error count: 12
- "PhanTypeObjectUnsetDeclaredProperty",
- // approximate error count: 9
- "PhanTypeSuspiciousNonTraversableForeach",
- // approximate error count: 3
- "PhanTypeSuspiciousStringExpression",
+ // approximate error count: 19
+ "PhanParamReqAfterOpt", // False positives with nullables, ref phan issue #3159
+ // approximate error count: 110
+ "PhanParamTooMany", // False positives with variargs. Unsuppress after dropping HHVM
+
// approximate error count: 22
+ "PhanAccessMethodInternal",
+ // approximate error count: 36
"PhanUndeclaredConstant",
- // approximate error count: 3
- "PhanUndeclaredInvokeInCallable",
- // approximate error count: 237
+ // approximate error count: 60
+ "PhanTypeMismatchArgument",
+ // approximate error count: 219
"PhanUndeclaredMethod",
- // approximate error count: 846
+ // approximate error count: 752
"PhanUndeclaredProperty",
- // approximate error count: 2
- "PhanUndeclaredVariableAssignOp",
- // approximate error count: 55
- "PhanUndeclaredVariableDim",
] );
$cfg['ignore_undeclared_variables_in_global_scope'] = true;
-$cfg['globals_type_map']['IP'] = 'string';
+$cfg['globals_type_map'] = array_merge( $cfg['globals_type_map'], [
+ 'IP' => 'string',
+ 'wgGalleryOptions' => 'array',
+ 'wgDummyLanguageCodes' => 'string[]',
+ 'wgNamespaceProtection' => 'array<string,string|string[]>',
+ 'wgNamespaceAliases' => 'array<string,int>',
+ 'wgLockManagers' => 'array[]',
+ 'wgForeignFileRepos' => 'array[]',
+ 'wgDefaultUserOptions' => 'array',
+ 'wgSkipSkins' => 'string[]',
+ 'wgLogTypes' => 'string[]',
+ 'wgLogNames' => 'array<string,string>',
+ 'wgLogHeaders' => 'array<string,string>',
+ 'wgLogActionsHandlers' => 'array<string,class-string>',
+ 'wgPasswordPolicy' => 'array<string,array<string,string|array>>',
+ 'wgVirtualRestConfig' => 'array<string,array>',
+ 'wgWANObjectCaches' => 'array[]',
+ 'wgLocalInterwikis' => 'string[]',
+] );
return $cfg;