From a2f50311fd34a6bb4f6866a076802bb6fbe6ef9b Mon Sep 17 00:00:00 2001
From: lens0021 <lorentz0021@gmail.com>
Date: Sun, 13 Jun 2021 19:30:38 +0900
Subject: [PATCH] Fix the broken test

(cherry picked from commit ce0bfcc73fa9819a84063ac24fbee46cc687e76a)
(cherry picked from commit ebe0d9dc288ae66542a1ab40a0e601ca6c24dfbf)
(cherry picked from commit 77169c47cbd150a0a7840b95a8534f6c7203c3c2)
---
 .github/workflows/dependencies            |  1 +
 .phan/config.php                          |  2 ++
 includes/Hooks/Handler.php                | 10 ----------
 includes/Hooks/RelatedArticlesHandler.php |  3 +--
 4 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/dependencies b/.github/workflows/dependencies
index 75e4c27..f9af29f 100644
--- a/.github/workflows/dependencies
+++ b/.github/workflows/dependencies
@@ -1,2 +1,3 @@
 CategoryTree
+Disambiguator
 Wikibase
diff --git a/.phan/config.php b/.phan/config.php
index a505999..f59ba0b 100644
--- a/.phan/config.php
+++ b/.phan/config.php
@@ -6,6 +6,7 @@
 	$cfg['directory_list'],
 	[
 		'../../extensions/CategoryTree',
+		'../../extensions/Disambiguator',
 		'../../extensions/Wikibase',
 	]
 );
@@ -14,6 +15,7 @@
 	$cfg['exclude_analysis_directory_list'],
 	[
 		'../../extensions/CategoryTree',
+		'../../extensions/Disambiguator',
 		'../../extensions/Wikibase',
 	]
 );
diff --git a/includes/Hooks/Handler.php b/includes/Hooks/Handler.php
index 275e1f4..895ed4d 100644
--- a/includes/Hooks/Handler.php
+++ b/includes/Hooks/Handler.php
@@ -3,7 +3,6 @@
 namespace MediaWiki\Extension\UnifiedExtensionForFemiwiki\Hooks;
 
 use Config;
-use DisambiguatorHooks;
 use Html;
 use RequestContext;
 use Skin;
@@ -183,13 +182,4 @@ public function onHtmlPageLinkRendererBegin( $linkRenderer, $target, &$text,
 
 		return false;
 	}
-
-	/**
-	 * @param Title $title
-	 * @return bool
-	 */
-	private static function isDisambiguationPage( Title $title ) {
-		return \ExtensionRegistry::getInstance()->isLoaded( 'Disambiguator' ) &&
-			DisambiguatorHooks::isDisambiguationPage( $title );
-	}
 }
diff --git a/includes/Hooks/RelatedArticlesHandler.php b/includes/Hooks/RelatedArticlesHandler.php
index 75cfa0d..5972cd4 100644
--- a/includes/Hooks/RelatedArticlesHandler.php
+++ b/includes/Hooks/RelatedArticlesHandler.php
@@ -3,7 +3,6 @@
 namespace MediaWiki\Extension\UnifiedExtensionForFemiwiki\Hooks;
 
 use Config;
-use DisambiguatorHooks;
 use ExtensionRegistry;
 use MediaWiki\MediaWikiServices;
 use Title;
@@ -40,7 +39,7 @@ public function __construct( Config $config, ILoadBalancer $loadBalancer ) {
 	 */
 	private static function isDisambiguationPage( Title $title ) {
 		return \ExtensionRegistry::getInstance()->isLoaded( 'Disambiguator' ) &&
-			DisambiguatorHooks::isDisambiguationPage( $title );
+			\MediaWiki\Extension\Disambiguator\Hooks::isDisambiguationPage( $title );
 	}
 
 	/**