From 0cf8b3dfe5a6430a8d9883de868e5b8f1f12b20b Mon Sep 17 00:00:00 2001 From: gerritbot Date: Fri, 12 May 2023 14:33:05 +0000 Subject: [PATCH] Update moved class Category See T321882. Moved in I0b86acfdea Bug: T321681 Change-Id: If48e9163bcfcfe03098f61b7cc52137e4ecaae82 --- extension.json | 7 +++++-- includes/CategoryCache.php | 2 +- includes/CategoryTree.php | 2 +- tests/phpunit/CategoryCacheTest.php | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/extension.json b/extension.json index 993663a0..910f9a89 100644 --- a/extension.json +++ b/extension.json @@ -6,7 +6,7 @@ "license-name": "GPL-2.0-or-later", "type": "parserhook", "requires": { - "MediaWiki": ">= 1.38.0" + "MediaWiki": ">= 1.40.0" }, "ConfigRegistry": { "categorytree": "GlobalVarConfig::newInstance" @@ -92,7 +92,10 @@ "HookHandlers": { "default": { "class": "MediaWiki\\Extension\\CategoryTree\\Hooks", - "services": [ "CategoryTree.CategoryCache", "MainConfig" ] + "services": [ + "CategoryTree.CategoryCache", + "MainConfig" + ] }, "config": { "class": "MediaWiki\\Extension\\CategoryTree\\ConfigHookHandler" diff --git a/includes/CategoryCache.php b/includes/CategoryCache.php index e9e93dfd..42f5552c 100644 --- a/includes/CategoryCache.php +++ b/includes/CategoryCache.php @@ -20,7 +20,7 @@ namespace MediaWiki\Extension\CategoryTree; -use Category; +use MediaWiki\Category\Category; use MediaWiki\Linker\LinkTarget; use Wikimedia\Rdbms\ILoadBalancer; use Wikimedia\Rdbms\IResultWrapper; diff --git a/includes/CategoryTree.php b/includes/CategoryTree.php index 01f3ca9a..578f9e00 100644 --- a/includes/CategoryTree.php +++ b/includes/CategoryTree.php @@ -24,12 +24,12 @@ namespace MediaWiki\Extension\CategoryTree; -use Category; use Exception; use ExtensionRegistry; use FormatJson; use Html; use IContextSource; +use MediaWiki\Category\Category; use MediaWiki\Linker\LinkRenderer; use MediaWiki\MediaWikiServices; use OutputPage; diff --git a/tests/phpunit/CategoryCacheTest.php b/tests/phpunit/CategoryCacheTest.php index f271f07b..b2bd6440 100644 --- a/tests/phpunit/CategoryCacheTest.php +++ b/tests/phpunit/CategoryCacheTest.php @@ -20,7 +20,7 @@ namespace MediaWiki\Extension\CategoryTree\Tests; -use Category; +use MediaWiki\Category\Category; use MediaWiki\Extension\CategoryTree\CategoryCache; use MediaWikiIntegrationTestCase; use TitleValue;