aboutsummaryrefslogtreecommitdiffstats
path: root/.phan/config.php
diff options
context:
space:
mode:
authorDaimona Eaytoy <daimona.wiki@gmail.com>2023-09-11 23:22:12 +0200
committerDaimona Eaytoy <daimona.wiki@gmail.com>2023-09-11 23:22:12 +0200
commitf78fd3710d526a758886679fd645f60ffddf38a1 (patch)
treea64810e77c702364389d86aaf0616ae374fc4f4e /.phan/config.php
parent6ab92b722af7349b169bc7594e61e50e1ac3cbb3 (diff)
downloadmediawikicore-f78fd3710d526a758886679fd645f60ffddf38a1.tar.gz
mediawikicore-f78fd3710d526a758886679fd645f60ffddf38a1.zip
Add $wgRequest to phan's globals_type_map
The base phan config uses a file_exists check to determine whether to use the namespaced class name, but it doesn't work when running against core because MW_INSTALL_PATH isn't set. So specify the type in the local config, and remove @phan-var annotations added in I6bbdbbe6. Also use `::class` instead of string literals for classes. Change-Id: I994a0ed32ea948253ed07ee3cc8868a0eaa6d8b9
Diffstat (limited to '.phan/config.php')
-rw-r--r--.phan/config.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/.phan/config.php b/.phan/config.php
index 4ebb889838f5..1019f28ed819 100644
--- a/.phan/config.php
+++ b/.phan/config.php
@@ -157,7 +157,7 @@ $cfg['ignore_undeclared_variables_in_global_scope'] = true;
// remove them from here as well, so phan complains when something tries to use them.
$cfg['globals_type_map'] = array_merge( $cfg['globals_type_map'], [
'IP' => 'string',
- 'wgTitle' => 'MediaWiki\Title\Title',
+ 'wgTitle' => \MediaWiki\Title\Title::class,
'wgGalleryOptions' => 'array',
'wgDummyLanguageCodes' => 'string[]',
'wgNamespaceProtection' => 'array<int,string|string[]>',
@@ -175,8 +175,9 @@ $cfg['globals_type_map'] = array_merge( $cfg['globals_type_map'], [
'wgLocalInterwikis' => 'string[]',
'wgDebugLogGroups' => 'string|false|array{destination:string,sample?:int,level:int}',
'wgCookiePrefix' => 'string|false',
- 'wgOut' => 'MediaWiki\Output\OutputPage',
+ 'wgOut' => \MediaWiki\Output\OutputPage::class,
'wgExtraNamespaces' => 'string[]',
+ 'wgRequest' => \MediaWiki\Request\WebRequest::class,
] );
// Include a local config file if it exists