Merge "FauxRequest: don’t override getValues()"
[lhc/web/wiklou.git] / .phan / config.php
index 47f4512..0fdefe0 100644 (file)
@@ -88,21 +88,30 @@ $cfg['exclude_analysis_directory_list'] = [
        'maintenance/language/',
        // External class
        'includes/libs/jsminplus.php',
+       // External class
+       'includes/libs/objectcache/utils/MemcachedClient.php',
 ];
 
+// NOTE: If you're facing an issue which you cannot easily fix, DO NOT add it here. Suppress it
+// either in-line with @phan-suppress-next-line and similar, at block-level (via @suppress), or at
+// file-level (with @phan-file-suppress), so that it stays enabled for the rest of the codebase.
 $cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [
        // approximate error count: 19
        "PhanParamReqAfterOpt", // False positives with nullables (phan issue #3159). Use real nullables
        //after dropping HHVM
        // approximate error count: 110
        "PhanParamTooMany", // False positives with variargs. Unsuppress after dropping HHVM
-
-       // approximate error count: 60
-       "PhanTypeMismatchArgument",
-       // approximate error count: 752
-       "PhanUndeclaredProperty",
 ] );
 
+// This helps a lot in discovering bad code, but unfortunately it will always fail for
+// hooks + pass by reference, see phan issue #2943.
+// @todo Enable when the issue above is resolved and we update our config!
+$cfg['redundant_condition_detection'] = false;
+
+// Do not use aliases in core.
+// Use the correct name, because we don't need backward compatibility
+$cfg['enable_class_alias_support'] = false;
+
 $cfg['ignore_undeclared_variables_in_global_scope'] = true;
 // @todo It'd be great if we could just make phan read these from DefaultSettings, to avoid
 // duplicating the types.
@@ -125,6 +134,9 @@ $cfg['globals_type_map'] = array_merge( $cfg['globals_type_map'], [
        'wgWANObjectCaches' => 'array[]',
        'wgLocalInterwikis' => 'string[]',
        'wgDebugLogGroups' => 'string|false|array{destination:string,sample?:int,level:int}',
+       'wgCookiePrefix' => 'string|false',
+       'wgOut' => 'OutputPage',
+       'wgExtraNamespaces' => 'string[]',
 ] );
 
 return $cfg;