From bd84a6514c71c84ff8d3e2d1f85d9770d3d95553 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 10 Dec 2023 20:03:19 +0100 Subject: [PATCH] Use namespaced classes This requires 1.42 for some new names Changes to the use statements done automatically via script Addition of missing use statements and changes to docs done manually Change-Id: Ic1e2c9a0c891382744e4792bba1effece48e53f3 --- extension.json | 2 +- includes/AbuseFilterChangesList.php | 4 ++-- includes/AbuseFilterPreAuthenticationProvider.php | 4 ++-- includes/AbuseLogger.php | 4 ++-- includes/AbuseLoggerFactory.php | 2 +- includes/Api/EvalExpression.php | 2 +- includes/Api/QueryAbuseFilters.php | 2 +- includes/Api/QueryAbuseLog.php | 4 ++-- includes/BlockAutopromoteStore.php | 2 +- includes/BlockedDomainFilter.php | 4 ++-- includes/BlockedDomainStorage.php | 2 +- includes/ChangeTags/ChangeTagValidator.php | 2 +- includes/ChangeTags/ChangeTagger.php | 2 +- includes/Consequences/Consequence/Block.php | 2 +- .../Consequences/Consequence/BlockingConsequence.php | 2 +- includes/Consequences/Consequence/Degroup.php | 2 +- includes/Consequences/ConsequencesExecutor.php | 2 +- includes/EditBox/AceEditBoxBuilder.php | 2 +- includes/EditBox/EditBoxBuilder.php | 2 +- includes/EditBox/EditBoxBuilderFactory.php | 2 +- includes/FilterRunner.php | 4 ++-- includes/FilterRunnerFactory.php | 2 +- includes/FilterStore.php | 2 +- includes/FilterUser.php | 2 +- includes/FilterValidator.php | 2 +- includes/Hooks/AbuseFilterAlterVariablesHook.php | 2 +- includes/Hooks/AbuseFilterGenerateUserVarsHook.php | 2 +- .../AbuseFilterGenerateVarsForRecentChangeHook.php | 2 +- includes/Hooks/AbuseFilterHookRunner.php | 2 +- includes/Hooks/AbuseFilterShouldFilterActionHook.php | 2 +- includes/Hooks/Handlers/EditPermissionHandler.php | 4 ++-- includes/Hooks/Handlers/FilteredActionsHandler.php | 6 +++--- includes/Hooks/Handlers/SchemaChangesHandler.php | 2 +- includes/Hooks/Handlers/ToolLinksHandler.php | 4 ++-- includes/Hooks/Handlers/UserMergeHandler.php | 2 +- .../LogFormatter/AbuseFilterModifyLogFormatter.php | 2 +- includes/LogFormatter/AbuseLogHitFormatter.php | 2 +- includes/Pager/AbuseFilterExaminePager.php | 2 +- includes/Pager/AbuseFilterHistoryPager.php | 6 +++--- includes/Pager/AbuseFilterPager.php | 8 ++++---- includes/Pager/AbuseLogPager.php | 12 ++++++------ includes/Parser/FilterEvaluator.php | 2 +- includes/Special/AbuseFilterSpecialPage.php | 4 ++-- includes/Special/BlockedExternalDomains.php | 4 ++-- includes/Special/SpecialAbuseFilter.php | 2 +- includes/Special/SpecialAbuseLog.php | 10 +++++----- includes/VariableGenerator/RCVariableGenerator.php | 2 +- includes/VariableGenerator/RunVariableGenerator.php | 2 +- includes/VariableGenerator/VariableGenerator.php | 4 ++-- .../VariableGenerator/VariableGeneratorFactory.php | 2 +- includes/Variables/LazyVariableComputer.php | 2 +- includes/Variables/VariablesFormatter.php | 2 +- includes/View/AbuseFilterView.php | 2 +- includes/View/AbuseFilterViewDiff.php | 4 ++-- includes/View/AbuseFilterViewEdit.php | 8 ++++---- includes/View/AbuseFilterViewHistory.php | 2 +- includes/View/AbuseFilterViewList.php | 2 +- includes/View/AbuseFilterViewRevert.php | 8 ++++---- includes/View/AbuseFilterViewTestBatch.php | 2 +- includes/View/HideAbuseLog.php | 4 ++-- includes/Watcher/EmergencyWatcher.php | 4 ++-- includes/Watcher/UpdateHitCountWatcher.php | 2 +- maintenance/AddMissingLoggingEntries.php | 2 +- maintenance/PurgeOldLogIPData.php | 2 +- tests/phpunit/AbuseFilterConsequencesTest.php | 4 ++++ tests/phpunit/AbuseFilterCreateAccountTestTrait.php | 1 + tests/phpunit/AbuseFilterUploadTestTrait.php | 1 + tests/phpunit/LazyVariableComputerDBTest.php | 1 + tests/phpunit/RCVariableGeneratorTest.php | 3 +++ tests/phpunit/integration/FilterRunnerTest.php | 4 ++-- .../Maintenance/PurgeOldLogIPDataTest.php | 2 +- tests/phpunit/unit/AbuseLoggerFactoryTest.php | 2 +- tests/phpunit/unit/ActionSpecifierTest.php | 2 +- tests/phpunit/unit/ChangeTags/ChangeTaggerTest.php | 2 +- .../unit/Consequences/Consequence/BlockTest.php | 2 +- .../unit/Consequences/Consequence/RangeBlockTest.php | 2 +- .../unit/Consequences/Consequence/WarnTest.php | 2 +- tests/phpunit/unit/EditBoxBuilderFactoryTest.php | 2 +- tests/phpunit/unit/EditRevUpdaterTest.php | 2 +- tests/phpunit/unit/EditStashCacheTest.php | 2 +- tests/phpunit/unit/FilterRunnerFactoryTest.php | 2 +- tests/phpunit/unit/FilterValidatorTest.php | 2 +- tests/phpunit/unit/Hooks/ToolLinksHandlerTest.php | 6 +++--- .../VariableGeneratorFactoryTest.php | 2 +- .../unit/VariableGenerator/VariableGeneratorTest.php | 2 +- .../unit/Variables/LazyVariableComputerTest.php | 2 +- tests/phpunit/unit/Watcher/EmergencyWatcherTest.php | 2 +- 87 files changed, 131 insertions(+), 121 deletions(-) diff --git a/extension.json b/extension.json index 8aa552539..207feef6f 100644 --- a/extension.json +++ b/extension.json @@ -12,7 +12,7 @@ "license-name": "GPL-2.0-or-later", "type": "antispam", "requires": { - "MediaWiki": ">= 1.41.0" + "MediaWiki": ">= 1.42.0" }, "AvailableRights": [ "abusefilter-modify", diff --git a/includes/AbuseFilterChangesList.php b/includes/AbuseFilterChangesList.php index a402e3f26..550e1825f 100644 --- a/includes/AbuseFilterChangesList.php +++ b/includes/AbuseFilterChangesList.php @@ -4,13 +4,13 @@ namespace MediaWiki\Extension\AbuseFilter; use HtmlArmor; use IContextSource; -use Linker; use LogFormatter; +use MediaWiki\Linker\Linker; use MediaWiki\MediaWikiServices; use MediaWiki\Revision\RevisionRecord; +use MediaWiki\SpecialPage\SpecialPage; use OldChangesList; use RecentChange; -use SpecialPage; class AbuseFilterChangesList extends OldChangesList { diff --git a/includes/AbuseFilterPreAuthenticationProvider.php b/includes/AbuseFilterPreAuthenticationProvider.php index 8c5e61ca2..519b08903 100644 --- a/includes/AbuseFilterPreAuthenticationProvider.php +++ b/includes/AbuseFilterPreAuthenticationProvider.php @@ -6,10 +6,10 @@ use IBufferingStatsdDataFactory; use MediaWiki\Auth\AbstractPreAuthenticationProvider; use MediaWiki\Auth\AuthenticationRequest; use MediaWiki\Extension\AbuseFilter\VariableGenerator\VariableGeneratorFactory; +use MediaWiki\SpecialPage\SpecialPage; +use MediaWiki\User\User; use MediaWiki\User\UserFactory; -use SpecialPage; use StatusValue; -use User; /** * AuthenticationProvider used to filter account creations. This runs after normal preauth providers diff --git a/includes/AbuseLogger.php b/includes/AbuseLogger.php index da71c2d2f..124d5da76 100644 --- a/includes/AbuseLogger.php +++ b/includes/AbuseLogger.php @@ -2,18 +2,18 @@ namespace MediaWiki\Extension\AbuseFilter; -use DeferredUpdates; use ExtensionRegistry; use InvalidArgumentException; use ManualLogEntry; use MediaWiki\CheckUser\Hooks; use MediaWiki\Config\ServiceOptions; +use MediaWiki\Deferred\DeferredUpdates; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Extension\AbuseFilter\Variables\VariablesBlobStore; use MediaWiki\Extension\AbuseFilter\Variables\VariablesManager; use MediaWiki\Title\Title; +use MediaWiki\User\User; use MediaWiki\User\UserIdentityValue; -use User; use Wikimedia\Rdbms\IDatabase; use Wikimedia\Rdbms\LBFactory; diff --git a/includes/AbuseLoggerFactory.php b/includes/AbuseLoggerFactory.php index c03065801..ece6e187e 100644 --- a/includes/AbuseLoggerFactory.php +++ b/includes/AbuseLoggerFactory.php @@ -7,7 +7,7 @@ use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Extension\AbuseFilter\Variables\VariablesBlobStore; use MediaWiki\Extension\AbuseFilter\Variables\VariablesManager; use MediaWiki\Title\Title; -use User; +use MediaWiki\User\User; use Wikimedia\Rdbms\LBFactory; class AbuseLoggerFactory { diff --git a/includes/Api/EvalExpression.php b/includes/Api/EvalExpression.php index c329334c6..889b31bf9 100644 --- a/includes/Api/EvalExpression.php +++ b/includes/Api/EvalExpression.php @@ -9,7 +9,7 @@ use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\Parser\RuleCheckerFactory; use MediaWiki\Extension\AbuseFilter\VariableGenerator\VariableGeneratorFactory; use MediaWiki\Extension\AbuseFilter\Variables\VariablesFormatter; -use Status; +use MediaWiki\Status\Status; use Wikimedia\ParamValidator\ParamValidator; class EvalExpression extends ApiBase { diff --git a/includes/Api/QueryAbuseFilters.php b/includes/Api/QueryAbuseFilters.php index c43e76ce2..776d5fc87 100644 --- a/includes/Api/QueryAbuseFilters.php +++ b/includes/Api/QueryAbuseFilters.php @@ -23,7 +23,7 @@ use ApiQuery; use ApiQueryBase; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\AbuseFilterServices; -use MWTimestamp; +use MediaWiki\Utils\MWTimestamp; use Wikimedia\ParamValidator\ParamValidator; use Wikimedia\ParamValidator\TypeDef\IntegerDef; diff --git a/includes/Api/QueryAbuseLog.php b/includes/Api/QueryAbuseLog.php index bc8133090..a48472ef0 100644 --- a/includes/Api/QueryAbuseLog.php +++ b/includes/Api/QueryAbuseLog.php @@ -31,8 +31,8 @@ use MediaWiki\Extension\AbuseFilter\Special\SpecialAbuseLog; use MediaWiki\Extension\AbuseFilter\Variables\VariablesBlobStore; use MediaWiki\Extension\AbuseFilter\Variables\VariablesManager; use MediaWiki\Title\Title; -use MWTimestamp; -use User; +use MediaWiki\User\User; +use MediaWiki\Utils\MWTimestamp; use Wikimedia\IPUtils; use Wikimedia\ParamValidator\ParamValidator; use Wikimedia\ParamValidator\TypeDef\IntegerDef; diff --git a/includes/BlockAutopromoteStore.php b/includes/BlockAutopromoteStore.php index ea46b10da..14a355471 100644 --- a/includes/BlockAutopromoteStore.php +++ b/includes/BlockAutopromoteStore.php @@ -4,9 +4,9 @@ namespace MediaWiki\Extension\AbuseFilter; use BagOStuff; use ManualLogEntry; +use MediaWiki\Title\TitleValue; use MediaWiki\User\UserIdentity; use Psr\Log\LoggerInterface; -use TitleValue; /** * Class responsible for storing and retrieving blockautopromote status diff --git a/includes/BlockedDomainFilter.php b/includes/BlockedDomainFilter.php index fa9b0b42a..777d35bfc 100644 --- a/includes/BlockedDomainFilter.php +++ b/includes/BlockedDomainFilter.php @@ -26,10 +26,10 @@ use MediaWiki\CheckUser\Hooks as CUHooks; use MediaWiki\Extension\AbuseFilter\Variables\UnsetVariableException; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Extension\AbuseFilter\Variables\VariablesManager; +use MediaWiki\Status\Status; use MediaWiki\Title\Title; +use MediaWiki\User\User; use Message; -use Status; -use User; /** * Filters blocked domains diff --git a/includes/BlockedDomainStorage.php b/includes/BlockedDomainStorage.php index 77adb3c97..c7f611e20 100644 --- a/includes/BlockedDomainStorage.php +++ b/includes/BlockedDomainStorage.php @@ -30,12 +30,12 @@ use MediaWiki\Page\WikiPageFactory; use MediaWiki\Revision\RevisionLookup; use MediaWiki\Revision\RevisionRecord; use MediaWiki\Revision\SlotRecord; +use MediaWiki\Title\TitleValue; use MediaWiki\User\UserFactory; use MediaWiki\Utils\UrlUtils; use Message; use RecentChange; use StatusValue; -use TitleValue; /** * Hold and update information about blocked external domains diff --git a/includes/ChangeTags/ChangeTagValidator.php b/includes/ChangeTags/ChangeTagValidator.php index f5d0ddd02..040e059ac 100644 --- a/includes/ChangeTags/ChangeTagValidator.php +++ b/includes/ChangeTags/ChangeTagValidator.php @@ -3,7 +3,7 @@ namespace MediaWiki\Extension\AbuseFilter\ChangeTags; use ChangeTags; -use Status; +use MediaWiki\Status\Status; /** * Service for testing whether filters can tag edits and other changes diff --git a/includes/ChangeTags/ChangeTagger.php b/includes/ChangeTags/ChangeTagger.php index 0f314907c..71933df40 100644 --- a/includes/ChangeTags/ChangeTagger.php +++ b/includes/ChangeTags/ChangeTagger.php @@ -3,9 +3,9 @@ namespace MediaWiki\Extension\AbuseFilter\ChangeTags; use MediaWiki\Extension\AbuseFilter\ActionSpecifier; +use MediaWiki\Title\TitleValue; use MediaWiki\User\UserIdentityValue; use RecentChange; -use TitleValue; /** * Class that collects change tags to be later applied diff --git a/includes/Consequences/Consequence/Block.php b/includes/Consequences/Consequence/Block.php index a32dd3cf9..d52bd801a 100644 --- a/includes/Consequences/Consequence/Block.php +++ b/includes/Consequences/Consequence/Block.php @@ -8,10 +8,10 @@ use MediaWiki\Block\DatabaseBlockStore; use MediaWiki\Extension\AbuseFilter\Consequences\Parameters; use MediaWiki\Extension\AbuseFilter\FilterUser; use MediaWiki\Extension\AbuseFilter\GlobalNameUtils; +use MediaWiki\Title\TitleValue; use MediaWiki\User\UserIdentity; use MessageLocalizer; use Psr\Log\LoggerInterface; -use TitleValue; /** * Consequence that blocks a single user. diff --git a/includes/Consequences/Consequence/BlockingConsequence.php b/includes/Consequences/Consequence/BlockingConsequence.php index e7ed75849..7ea8417c0 100644 --- a/includes/Consequences/Consequence/BlockingConsequence.php +++ b/includes/Consequences/Consequence/BlockingConsequence.php @@ -6,9 +6,9 @@ use LogPage; use MediaWiki\Block\BlockUserFactory; use MediaWiki\Extension\AbuseFilter\Consequences\Parameters; use MediaWiki\Extension\AbuseFilter\FilterUser; +use MediaWiki\Status\Status; use MessageLocalizer; use Psr\Log\LoggerInterface; -use Status; use Wikimedia\IPUtils; /** diff --git a/includes/Consequences/Consequence/Degroup.php b/includes/Consequences/Consequence/Degroup.php index ec534718b..786a610d8 100644 --- a/includes/Consequences/Consequence/Degroup.php +++ b/includes/Consequences/Consequence/Degroup.php @@ -9,11 +9,11 @@ use MediaWiki\Extension\AbuseFilter\GlobalNameUtils; use MediaWiki\Extension\AbuseFilter\Variables\LazyLoadedVariable; use MediaWiki\Extension\AbuseFilter\Variables\UnsetVariableException; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; +use MediaWiki\Title\TitleValue; use MediaWiki\User\UserGroupManager; use MediaWiki\User\UserIdentity; use MediaWiki\User\UserIdentityUtils; use MessageLocalizer; -use TitleValue; /** * Consequence that removes all user groups from a user. diff --git a/includes/Consequences/ConsequencesExecutor.php b/includes/Consequences/ConsequencesExecutor.php index 6810ac3db..3fee9c5e3 100644 --- a/includes/Consequences/ConsequencesExecutor.php +++ b/includes/Consequences/ConsequencesExecutor.php @@ -12,9 +12,9 @@ use MediaWiki\Extension\AbuseFilter\Consequences\Consequence\HookAborterConseque use MediaWiki\Extension\AbuseFilter\FilterLookup; use MediaWiki\Extension\AbuseFilter\GlobalNameUtils; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; +use MediaWiki\Status\Status; use MediaWiki\User\UserIdentityUtils; use Psr\Log\LoggerInterface; -use Status; class ConsequencesExecutor { public const CONSTRUCTOR_OPTIONS = [ diff --git a/includes/EditBox/AceEditBoxBuilder.php b/includes/EditBox/AceEditBoxBuilder.php index e041f2c04..5cba54275 100644 --- a/includes/EditBox/AceEditBoxBuilder.php +++ b/includes/EditBox/AceEditBoxBuilder.php @@ -6,12 +6,12 @@ use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\KeywordsManager; use MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterTokenizer; use MediaWiki\Extension\AbuseFilter\Parser\FilterEvaluator; +use MediaWiki\Output\OutputPage; use MediaWiki\Permissions\Authority; use MessageLocalizer; use OOUI\ButtonWidget; use OOUI\HorizontalLayout; use OOUI\Widget; -use OutputPage; use Xml; /** diff --git a/includes/EditBox/EditBoxBuilder.php b/includes/EditBox/EditBoxBuilder.php index 1ea3f8e5e..0b3ba19d9 100644 --- a/includes/EditBox/EditBoxBuilder.php +++ b/includes/EditBox/EditBoxBuilder.php @@ -4,6 +4,7 @@ namespace MediaWiki\Extension\AbuseFilter\EditBox; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\KeywordsManager; +use MediaWiki\Output\OutputPage; use MediaWiki\Permissions\Authority; use MessageLocalizer; use OOUI\ButtonWidget; @@ -11,7 +12,6 @@ use OOUI\DropdownInputWidget; use OOUI\FieldLayout; use OOUI\FieldsetLayout; use OOUI\Widget; -use OutputPage; use Xml; /** diff --git a/includes/EditBox/EditBoxBuilderFactory.php b/includes/EditBox/EditBoxBuilderFactory.php index 5887ed5ea..bf94a3c46 100644 --- a/includes/EditBox/EditBoxBuilderFactory.php +++ b/includes/EditBox/EditBoxBuilderFactory.php @@ -5,9 +5,9 @@ namespace MediaWiki\Extension\AbuseFilter\EditBox; use LogicException; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\KeywordsManager; +use MediaWiki\Output\OutputPage; use MediaWiki\Permissions\Authority; use MessageLocalizer; -use OutputPage; /** * Factory for EditBoxBuilder objects diff --git a/includes/FilterRunner.php b/includes/FilterRunner.php index a39ba6fab..4f8ffb380 100644 --- a/includes/FilterRunner.php +++ b/includes/FilterRunner.php @@ -2,9 +2,9 @@ namespace MediaWiki\Extension\AbuseFilter; -use DeferredUpdates; use InvalidArgumentException; use MediaWiki\Config\ServiceOptions; +use MediaWiki\Deferred\DeferredUpdates; use MediaWiki\Extension\AbuseFilter\ChangeTags\ChangeTagger; use MediaWiki\Extension\AbuseFilter\Consequences\ConsequencesExecutorFactory; use MediaWiki\Extension\AbuseFilter\Filter\ExistingFilter; @@ -18,8 +18,8 @@ use MediaWiki\Extension\AbuseFilter\Variables\VariablesManager; use MediaWiki\Extension\AbuseFilter\Watcher\Watcher; use MediaWiki\Status\Status; use MediaWiki\Title\Title; +use MediaWiki\User\User; use Psr\Log\LoggerInterface; -use User; /** * This class contains the logic for executing abuse filters and their actions. The entry points are diff --git a/includes/FilterRunnerFactory.php b/includes/FilterRunnerFactory.php index 747b1b78f..969fade52 100644 --- a/includes/FilterRunnerFactory.php +++ b/includes/FilterRunnerFactory.php @@ -15,9 +15,9 @@ use MediaWiki\Extension\AbuseFilter\Variables\VariablesManager; use MediaWiki\Extension\AbuseFilter\Watcher\EmergencyWatcher; use MediaWiki\Extension\AbuseFilter\Watcher\UpdateHitCountWatcher; use MediaWiki\Title\Title; +use MediaWiki\User\User; use NullStatsdDataFactory; use Psr\Log\LoggerInterface; -use User; class FilterRunnerFactory { public const SERVICE_NAME = 'AbuseFilterFilterRunnerFactory'; diff --git a/includes/FilterStore.php b/includes/FilterStore.php index 19edd1cc4..a771b9af0 100644 --- a/includes/FilterStore.php +++ b/includes/FilterStore.php @@ -8,9 +8,9 @@ use MediaWiki\Extension\AbuseFilter\Consequences\ConsequencesRegistry; use MediaWiki\Extension\AbuseFilter\Filter\Filter; use MediaWiki\Extension\AbuseFilter\Special\SpecialAbuseFilter; use MediaWiki\Permissions\Authority; +use MediaWiki\Status\Status; use MediaWiki\User\ActorMigrationBase; use MediaWiki\User\UserIdentity; -use Status; use Wikimedia\Rdbms\LBFactory; /** diff --git a/includes/FilterUser.php b/includes/FilterUser.php index 45b85e411..028421be0 100644 --- a/includes/FilterUser.php +++ b/includes/FilterUser.php @@ -3,11 +3,11 @@ namespace MediaWiki\Extension\AbuseFilter; use MediaWiki\Permissions\Authority; +use MediaWiki\User\User; use MediaWiki\User\UserGroupManager; use MediaWiki\User\UserIdentity; use MessageLocalizer; use Psr\Log\LoggerInterface; -use User; class FilterUser { public const SERVICE_NAME = 'AbuseFilterFilterUser'; diff --git a/includes/FilterValidator.php b/includes/FilterValidator.php index ab3246602..8fd062cb8 100644 --- a/includes/FilterValidator.php +++ b/includes/FilterValidator.php @@ -8,8 +8,8 @@ use MediaWiki\Extension\AbuseFilter\Filter\AbstractFilter; use MediaWiki\Extension\AbuseFilter\Parser\Exception\UserVisibleException; use MediaWiki\Extension\AbuseFilter\Parser\RuleCheckerFactory; use MediaWiki\Permissions\Authority; +use MediaWiki\Status\Status; use Message; -use Status; /** * This class validates filters, e.g. before saving. diff --git a/includes/Hooks/AbuseFilterAlterVariablesHook.php b/includes/Hooks/AbuseFilterAlterVariablesHook.php index 20f9e1180..74ffa05b0 100644 --- a/includes/Hooks/AbuseFilterAlterVariablesHook.php +++ b/includes/Hooks/AbuseFilterAlterVariablesHook.php @@ -4,7 +4,7 @@ namespace MediaWiki\Extension\AbuseFilter\Hooks; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Title\Title; -use User; +use MediaWiki\User\User; interface AbuseFilterAlterVariablesHook { /** diff --git a/includes/Hooks/AbuseFilterGenerateUserVarsHook.php b/includes/Hooks/AbuseFilterGenerateUserVarsHook.php index 09c735fe0..566b20ae8 100644 --- a/includes/Hooks/AbuseFilterGenerateUserVarsHook.php +++ b/includes/Hooks/AbuseFilterGenerateUserVarsHook.php @@ -3,8 +3,8 @@ namespace MediaWiki\Extension\AbuseFilter\Hooks; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; +use MediaWiki\User\User; use RecentChange; -use User; interface AbuseFilterGenerateUserVarsHook { /** diff --git a/includes/Hooks/AbuseFilterGenerateVarsForRecentChangeHook.php b/includes/Hooks/AbuseFilterGenerateVarsForRecentChangeHook.php index abc2a4d65..1d5f918d1 100644 --- a/includes/Hooks/AbuseFilterGenerateVarsForRecentChangeHook.php +++ b/includes/Hooks/AbuseFilterGenerateVarsForRecentChangeHook.php @@ -4,8 +4,8 @@ namespace MediaWiki\Extension\AbuseFilter\Hooks; use MediaWiki\Extension\AbuseFilter\VariableGenerator\RCVariableGenerator; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; +use MediaWiki\User\User; use RecentChange; -use User; interface AbuseFilterGenerateVarsForRecentChangeHook { /** diff --git a/includes/Hooks/AbuseFilterHookRunner.php b/includes/Hooks/AbuseFilterHookRunner.php index 1b6cb8a19..fd753170e 100644 --- a/includes/Hooks/AbuseFilterHookRunner.php +++ b/includes/Hooks/AbuseFilterHookRunner.php @@ -7,8 +7,8 @@ use MediaWiki\Extension\AbuseFilter\VariableGenerator\RCVariableGenerator; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\HookContainer\HookContainer; use MediaWiki\Title\Title; +use MediaWiki\User\User; use RecentChange; -use User; /** * Handle running AbuseFilter's hooks diff --git a/includes/Hooks/AbuseFilterShouldFilterActionHook.php b/includes/Hooks/AbuseFilterShouldFilterActionHook.php index be7b06c8e..333c02263 100644 --- a/includes/Hooks/AbuseFilterShouldFilterActionHook.php +++ b/includes/Hooks/AbuseFilterShouldFilterActionHook.php @@ -4,7 +4,7 @@ namespace MediaWiki\Extension\AbuseFilter\Hooks; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Title\Title; -use User; +use MediaWiki\User\User; interface AbuseFilterShouldFilterActionHook { /** diff --git a/includes/Hooks/Handlers/EditPermissionHandler.php b/includes/Hooks/Handlers/EditPermissionHandler.php index 23b742210..a3714c87d 100644 --- a/includes/Hooks/Handlers/EditPermissionHandler.php +++ b/includes/Hooks/Handlers/EditPermissionHandler.php @@ -10,10 +10,10 @@ use MediaWiki\MediaWikiServices; use MediaWiki\Page\PageIdentity; use MediaWiki\Permissions\Hook\GetUserPermissionsErrorsHook; use MediaWiki\Title\Title; +use MediaWiki\Title\TitleValue; +use MediaWiki\User\User; use MessageSpecifier; use StatusValue; -use TitleValue; -use User; /** * This hook handler is for very simple checks, rather than the much more advanced ones diff --git a/includes/Hooks/Handlers/FilteredActionsHandler.php b/includes/Hooks/Handlers/FilteredActionsHandler.php index 9bb313bb5..a379584c0 100644 --- a/includes/Hooks/Handlers/FilteredActionsHandler.php +++ b/includes/Hooks/Handlers/FilteredActionsHandler.php @@ -4,9 +4,9 @@ namespace MediaWiki\Extension\AbuseFilter\Hooks\Handlers; use ApiMessage; use Content; -use DeferredUpdates; use IBufferingStatsdDataFactory; use IContextSource; +use MediaWiki\Deferred\DeferredUpdates; use MediaWiki\Extension\AbuseFilter\BlockedDomainFilter; use MediaWiki\Extension\AbuseFilter\EditRevUpdater; use MediaWiki\Extension\AbuseFilter\FilterRunnerFactory; @@ -19,11 +19,11 @@ use MediaWiki\Logger\LoggerFactory; use MediaWiki\Page\Hook\ArticleDeleteHook; use MediaWiki\Permissions\PermissionManager; use MediaWiki\Revision\SlotRecord; +use MediaWiki\Status\Status; use MediaWiki\Storage\Hook\ParserOutputStashForEditHook; use MediaWiki\Title\Title; -use Status; +use MediaWiki\User\User; use UploadBase; -use User; use WikiPage; /** diff --git a/includes/Hooks/Handlers/SchemaChangesHandler.php b/includes/Hooks/Handlers/SchemaChangesHandler.php index 35964f762..dd62d2593 100644 --- a/includes/Hooks/Handlers/SchemaChangesHandler.php +++ b/includes/Hooks/Handlers/SchemaChangesHandler.php @@ -9,10 +9,10 @@ use MediaWiki\Extension\AbuseFilter\Maintenance\NormalizeThrottleParameters; use MediaWiki\Extension\AbuseFilter\Maintenance\UpdateVarDumps; use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook; use MediaWiki\MediaWikiServices; +use MediaWiki\User\User; use MediaWiki\User\UserGroupManager; use MessageLocalizer; use RequestContext; -use User; class SchemaChangesHandler implements LoadExtensionSchemaUpdatesHook { /** @var MessageLocalizer */ diff --git a/includes/Hooks/Handlers/ToolLinksHandler.php b/includes/Hooks/Handlers/ToolLinksHandler.php index 220c5aad5..3be34b2b8 100644 --- a/includes/Hooks/Handlers/ToolLinksHandler.php +++ b/includes/Hooks/Handlers/ToolLinksHandler.php @@ -7,9 +7,9 @@ use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\Special\SpecialAbuseLog; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkTarget; +use MediaWiki\SpecialPage\SpecialPage; use MediaWiki\Title\Title; -use SpecialPage; -use TitleValue; +use MediaWiki\Title\TitleValue; use Wikimedia\IPUtils; class ToolLinksHandler implements diff --git a/includes/Hooks/Handlers/UserMergeHandler.php b/includes/Hooks/Handlers/UserMergeHandler.php index e57b1eba1..6b1835607 100644 --- a/includes/Hooks/Handlers/UserMergeHandler.php +++ b/includes/Hooks/Handlers/UserMergeHandler.php @@ -2,7 +2,7 @@ namespace MediaWiki\Extension\AbuseFilter\Hooks\Handlers; -use Config; +use MediaWiki\Config\Config; use MediaWiki\Extension\UserMerge\Hooks\AccountFieldsHook; class UserMergeHandler implements AccountFieldsHook { diff --git a/includes/LogFormatter/AbuseFilterModifyLogFormatter.php b/includes/LogFormatter/AbuseFilterModifyLogFormatter.php index da67dd2b5..d26d89b9c 100644 --- a/includes/LogFormatter/AbuseFilterModifyLogFormatter.php +++ b/includes/LogFormatter/AbuseFilterModifyLogFormatter.php @@ -3,8 +3,8 @@ namespace MediaWiki\Extension\AbuseFilter\LogFormatter; use LogFormatter; +use MediaWiki\SpecialPage\SpecialPage; use Message; -use SpecialPage; class AbuseFilterModifyLogFormatter extends LogFormatter { diff --git a/includes/LogFormatter/AbuseLogHitFormatter.php b/includes/LogFormatter/AbuseLogHitFormatter.php index 5dff869c6..01ce3c643 100644 --- a/includes/LogFormatter/AbuseLogHitFormatter.php +++ b/includes/LogFormatter/AbuseLogHitFormatter.php @@ -4,8 +4,8 @@ namespace MediaWiki\Extension\AbuseFilter\LogFormatter; use LogFormatter; use MediaWiki\Extension\AbuseFilter\AbuseFilterServices; +use MediaWiki\SpecialPage\SpecialPage; use Message; -use SpecialPage; /** * This class formats abuse log notifications. diff --git a/includes/Pager/AbuseFilterExaminePager.php b/includes/Pager/AbuseFilterExaminePager.php index 7a1574225..ad4a97b64 100644 --- a/includes/Pager/AbuseFilterExaminePager.php +++ b/includes/Pager/AbuseFilterExaminePager.php @@ -4,9 +4,9 @@ namespace MediaWiki\Extension\AbuseFilter\Pager; use MediaWiki\Extension\AbuseFilter\AbuseFilterChangesList; use MediaWiki\Linker\LinkRenderer; +use MediaWiki\Pager\ReverseChronologicalPager; use MediaWiki\Title\Title; use RecentChange; -use ReverseChronologicalPager; use stdClass; use Wikimedia\Rdbms\IDatabase; diff --git a/includes/Pager/AbuseFilterHistoryPager.php b/includes/Pager/AbuseFilterHistoryPager.php index 82fa3f1b8..3aaf5c675 100644 --- a/includes/Pager/AbuseFilterHistoryPager.php +++ b/includes/Pager/AbuseFilterHistoryPager.php @@ -4,18 +4,18 @@ namespace MediaWiki\Extension\AbuseFilter\Pager; use HtmlArmor; use IContextSource; -use Linker; use MediaWiki\Cache\LinkBatchFactory; use MediaWiki\Extension\AbuseFilter\AbuseFilter; use MediaWiki\Extension\AbuseFilter\AbuseFilterServices; use MediaWiki\Extension\AbuseFilter\FilterLookup; use MediaWiki\Extension\AbuseFilter\Special\SpecialAbuseFilter; use MediaWiki\Extension\AbuseFilter\SpecsFormatter; +use MediaWiki\Linker\Linker; use MediaWiki\Linker\LinkRenderer; use MediaWiki\MediaWikiServices; +use MediaWiki\Pager\TablePager; use MediaWiki\Title\Title; use MediaWiki\User\UserRigorOptions; -use TablePager; use UnexpectedValueException; use Wikimedia\Rdbms\IResultWrapper; use Xml; @@ -74,7 +74,7 @@ class AbuseFilterHistoryPager extends TablePager { /** * Note: this method is called by parent::__construct * @return array - * @see Pager::getFieldNames() + * @see MediaWiki\Pager\Pager::getFieldNames() */ public function getFieldNames() { static $headers = null; diff --git a/includes/Pager/AbuseFilterPager.php b/includes/Pager/AbuseFilterPager.php index 78a46099d..fcdeda085 100644 --- a/includes/Pager/AbuseFilterPager.php +++ b/includes/Pager/AbuseFilterPager.php @@ -2,17 +2,17 @@ namespace MediaWiki\Extension\AbuseFilter\Pager; -use Linker; use LogicException; use MediaWiki\Cache\LinkBatchFactory; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\AbuseFilterServices; use MediaWiki\Extension\AbuseFilter\SpecsFormatter; use MediaWiki\Extension\AbuseFilter\View\AbuseFilterViewList; +use MediaWiki\Linker\Linker; use MediaWiki\Linker\LinkRenderer; -use SpecialPage; +use MediaWiki\Pager\TablePager; +use MediaWiki\SpecialPage\SpecialPage; use stdClass; -use TablePager; use UnexpectedValueException; use Wikimedia\Rdbms\FakeResultWrapper; use Wikimedia\Rdbms\IResultWrapper; @@ -196,7 +196,7 @@ class AbuseFilterPager extends TablePager { /** * Note: this method is called by parent::__construct * @return array - * @see Pager::getFieldNames() + * @see MediaWiki\Pager\Pager::getFieldNames() */ public function getFieldNames() { $headers = [ diff --git a/includes/Pager/AbuseLogPager.php b/includes/Pager/AbuseLogPager.php index 157f2f234..0273b1bcd 100644 --- a/includes/Pager/AbuseLogPager.php +++ b/includes/Pager/AbuseLogPager.php @@ -4,21 +4,21 @@ namespace MediaWiki\Extension\AbuseFilter\Pager; use HtmlArmor; use IContextSource; -use Linker; use MediaWiki\Cache\LinkBatchFactory; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\AbuseFilterServices; use MediaWiki\Extension\AbuseFilter\CentralDBNotAvailableException; use MediaWiki\Extension\AbuseFilter\Special\SpecialAbuseLog; +use MediaWiki\Linker\Linker; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkTarget; use MediaWiki\MediaWikiServices; +use MediaWiki\Pager\ReverseChronologicalPager; +use MediaWiki\Parser\Sanitizer; use MediaWiki\Permissions\PermissionManager; +use MediaWiki\SpecialPage\SpecialPage; use MediaWiki\Title\Title; use MediaWiki\WikiMap\WikiMap; -use ReverseChronologicalPager; -use Sanitizer; -use SpecialPage; use stdClass; use Wikimedia\Rdbms\IResultWrapper; use Xml; @@ -300,7 +300,7 @@ class AbuseLogPager extends ReverseChronologicalPager { /** * Can this user see diffs generated by Special:Undelete for the page? - * @see \SpecialUndelete + * @see MediaWiki\Specials\SpecialUndelete * @param LinkTarget $page * * @return bool @@ -323,7 +323,7 @@ class AbuseLogPager extends ReverseChronologicalPager { /** * Can this user see diffs generated by Special:Undelete? - * @see \SpecialUndelete + * @see MediaWiki\Specials\SpecialUndelete * * @return bool */ diff --git a/includes/Parser/FilterEvaluator.php b/includes/Parser/FilterEvaluator.php index 95e49b3cb..6276b268c 100644 --- a/includes/Parser/FilterEvaluator.php +++ b/includes/Parser/FilterEvaluator.php @@ -15,8 +15,8 @@ use MediaWiki\Extension\AbuseFilter\Parser\Exception\UserVisibleException; use MediaWiki\Extension\AbuseFilter\Parser\Exception\UserVisibleWarning; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Extension\AbuseFilter\Variables\VariablesManager; +use MediaWiki\Parser\Sanitizer; use Psr\Log\LoggerInterface; -use Sanitizer; use Wikimedia\Equivset\Equivset; use Wikimedia\IPUtils; diff --git a/includes/Special/AbuseFilterSpecialPage.php b/includes/Special/AbuseFilterSpecialPage.php index b56bf9ecc..6eecd291e 100644 --- a/includes/Special/AbuseFilterSpecialPage.php +++ b/includes/Special/AbuseFilterSpecialPage.php @@ -4,8 +4,8 @@ namespace MediaWiki\Extension\AbuseFilter\Special; use HtmlArmor; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; -use SpecialPage; -use TitleValue; +use MediaWiki\SpecialPage\SpecialPage; +use MediaWiki\Title\TitleValue; use Xml; /** diff --git a/includes/Special/BlockedExternalDomains.php b/includes/Special/BlockedExternalDomains.php index 99acdbeb9..96628c135 100644 --- a/includes/Special/BlockedExternalDomains.php +++ b/includes/Special/BlockedExternalDomains.php @@ -20,12 +20,12 @@ namespace MediaWiki\Extension\AbuseFilter\Special; use ErrorPageError; -use Html; use HTMLForm; use IDBAccessObject; use MediaWiki\Extension\AbuseFilter\BlockedDomainStorage; +use MediaWiki\Html\Html; +use MediaWiki\SpecialPage\SpecialPage; use PermissionsError; -use SpecialPage; use WANObjectCache; /** diff --git a/includes/Special/SpecialAbuseFilter.php b/includes/Special/SpecialAbuseFilter.php index 60355c260..88f60ec58 100644 --- a/includes/Special/SpecialAbuseFilter.php +++ b/includes/Special/SpecialAbuseFilter.php @@ -2,7 +2,6 @@ namespace MediaWiki\Extension\AbuseFilter\Special; -use Html; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\CentralDBManager; use MediaWiki\Extension\AbuseFilter\Consequences\ConsequencesFactory; @@ -28,6 +27,7 @@ use MediaWiki\Extension\AbuseFilter\View\AbuseFilterViewList; use MediaWiki\Extension\AbuseFilter\View\AbuseFilterViewRevert; use MediaWiki\Extension\AbuseFilter\View\AbuseFilterViewTestBatch; use MediaWiki\Extension\AbuseFilter\View\AbuseFilterViewTools; +use MediaWiki\Html\Html; use MediaWiki\Title\Title; use Wikimedia\ObjectFactory\ObjectFactory; diff --git a/includes/Special/SpecialAbuseLog.php b/includes/Special/SpecialAbuseLog.php index 7ab70bf7a..eba2a1ab1 100644 --- a/includes/Special/SpecialAbuseLog.php +++ b/includes/Special/SpecialAbuseLog.php @@ -4,11 +4,8 @@ namespace MediaWiki\Extension\AbuseFilter\Special; use DifferenceEngine; use ExtensionRegistry; -use Html; use HTMLForm; use InvalidArgumentException; -use Linker; -use ListToggle; use ManualLogEntry; use MediaWiki\Cache\LinkBatchFactory; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; @@ -24,17 +21,20 @@ use MediaWiki\Extension\AbuseFilter\Variables\VariablesBlobStore; use MediaWiki\Extension\AbuseFilter\Variables\VariablesFormatter; use MediaWiki\Extension\AbuseFilter\Variables\VariablesManager; use MediaWiki\Extension\AbuseFilter\View\HideAbuseLog; +use MediaWiki\Html\Html; +use MediaWiki\Html\ListToggle; +use MediaWiki\Linker\Linker; use MediaWiki\MediaWikiServices; use MediaWiki\Permissions\Authority; use MediaWiki\Permissions\PermissionManager; use MediaWiki\Revision\RevisionRecord; +use MediaWiki\SpecialPage\SpecialPage; +use MediaWiki\Status\Status; use MediaWiki\Title\Title; use MediaWiki\User\UserIdentity; use MediaWiki\User\UserIdentityLookup; use MediaWiki\WikiMap\WikiMap; use OOUI\ButtonInputWidget; -use SpecialPage; -use Status; use stdClass; use Wikimedia\Rdbms\LBFactory; use Xml; diff --git a/includes/VariableGenerator/RCVariableGenerator.php b/includes/VariableGenerator/RCVariableGenerator.php index 007813128..ad15f734b 100644 --- a/includes/VariableGenerator/RCVariableGenerator.php +++ b/includes/VariableGenerator/RCVariableGenerator.php @@ -8,11 +8,11 @@ use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Logger\LoggerFactory; use MediaWiki\Page\WikiPageFactory; use MediaWiki\Title\Title; +use MediaWiki\User\User; use MimeAnalyzer; use MWFileProps; use RecentChange; use RepoGroup; -use User; /** * This class contains the logic used to create variable holders used to diff --git a/includes/VariableGenerator/RunVariableGenerator.php b/includes/VariableGenerator/RunVariableGenerator.php index 0d67479ab..4f1f8e695 100644 --- a/includes/VariableGenerator/RunVariableGenerator.php +++ b/includes/VariableGenerator/RunVariableGenerator.php @@ -12,10 +12,10 @@ use MediaWiki\Revision\MutableRevisionRecord; use MediaWiki\Revision\RevisionRecord; use MediaWiki\Revision\SlotRecord; use MediaWiki\Title\Title; +use MediaWiki\User\User; use MimeAnalyzer; use MWFileProps; use UploadBase; -use User; use Wikimedia\Assert\PreconditionException; use WikiPage; diff --git a/includes/VariableGenerator/VariableGenerator.php b/includes/VariableGenerator/VariableGenerator.php index e07e31efc..7828aadd6 100644 --- a/includes/VariableGenerator/VariableGenerator.php +++ b/includes/VariableGenerator/VariableGenerator.php @@ -6,10 +6,10 @@ use MediaWiki\Extension\AbuseFilter\Hooks\AbuseFilterHookRunner; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Storage\PreparedUpdate; use MediaWiki\Title\Title; +use MediaWiki\User\User; use MediaWiki\User\UserIdentity; -use MWTimestamp; +use MediaWiki\Utils\MWTimestamp; use RecentChange; -use User; use WikiPage; /** diff --git a/includes/VariableGenerator/VariableGeneratorFactory.php b/includes/VariableGenerator/VariableGeneratorFactory.php index ff15e37df..05450750f 100644 --- a/includes/VariableGenerator/VariableGeneratorFactory.php +++ b/includes/VariableGenerator/VariableGeneratorFactory.php @@ -7,10 +7,10 @@ use MediaWiki\Extension\AbuseFilter\TextExtractor; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Page\WikiPageFactory; use MediaWiki\Title\Title; +use MediaWiki\User\User; use MimeAnalyzer; use RecentChange; use RepoGroup; -use User; class VariableGeneratorFactory { public const SERVICE_NAME = 'AbuseFilterVariableGeneratorFactory'; diff --git a/includes/Variables/LazyVariableComputer.php b/includes/Variables/LazyVariableComputer.php index 2a039d0ef..771382b0e 100644 --- a/includes/Variables/LazyVariableComputer.php +++ b/includes/Variables/LazyVariableComputer.php @@ -17,6 +17,7 @@ use MediaWiki\Revision\RevisionStore; use MediaWiki\Revision\SlotRecord; use MediaWiki\Storage\PreparedUpdate; use MediaWiki\Title\Title; +use MediaWiki\User\User; use MediaWiki\User\UserEditTracker; use MediaWiki\User\UserGroupManager; use MediaWiki\User\UserIdentity; @@ -27,7 +28,6 @@ use stdClass; use StringUtils; use TextContent; use UnexpectedValueException; -use User; use WANObjectCache; use Wikimedia\Diff\Diff; use Wikimedia\Diff\UnifiedDiffFormatter; diff --git a/includes/Variables/VariablesFormatter.php b/includes/Variables/VariablesFormatter.php index 63e438209..656835935 100644 --- a/includes/Variables/VariablesFormatter.php +++ b/includes/Variables/VariablesFormatter.php @@ -2,8 +2,8 @@ namespace MediaWiki\Extension\AbuseFilter\Variables; -use Html; use MediaWiki\Extension\AbuseFilter\KeywordsManager; +use MediaWiki\Html\Html; use MessageLocalizer; use Xml; diff --git a/includes/View/AbuseFilterView.php b/includes/View/AbuseFilterView.php index 8097dcde0..369e3dc17 100644 --- a/includes/View/AbuseFilterView.php +++ b/includes/View/AbuseFilterView.php @@ -9,10 +9,10 @@ use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Permissions\Authority; use MediaWiki\Revision\RevisionRecord; +use MediaWiki\SpecialPage\SpecialPage; use MediaWiki\Title\Title; use OOUI; use RecentChange; -use SpecialPage; use UnexpectedValueException; use Wikimedia\Rdbms\Platform\ISQLPlatform; use Xml; diff --git a/includes/View/AbuseFilterViewDiff.php b/includes/View/AbuseFilterViewDiff.php index a8b626437..f328f77a7 100644 --- a/includes/View/AbuseFilterViewDiff.php +++ b/includes/View/AbuseFilterViewDiff.php @@ -3,9 +3,7 @@ namespace MediaWiki\Extension\AbuseFilter\View; use DifferenceEngine; -use Html; use IContextSource; -use Linker; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\Filter\ClosestFilterVersionNotFoundException; use MediaWiki\Extension\AbuseFilter\Filter\FilterNotFoundException; @@ -14,6 +12,8 @@ use MediaWiki\Extension\AbuseFilter\Filter\HistoryFilter; use MediaWiki\Extension\AbuseFilter\FilterLookup; use MediaWiki\Extension\AbuseFilter\SpecsFormatter; use MediaWiki\Extension\AbuseFilter\TableDiffFormatterFullContext; +use MediaWiki\Html\Html; +use MediaWiki\Linker\Linker; use MediaWiki\Linker\LinkRenderer; use OOUI; use TextContent; diff --git a/includes/View/AbuseFilterViewEdit.php b/includes/View/AbuseFilterViewEdit.php index de85cf276..15a14bca6 100644 --- a/includes/View/AbuseFilterViewEdit.php +++ b/includes/View/AbuseFilterViewEdit.php @@ -2,10 +2,8 @@ namespace MediaWiki\Extension\AbuseFilter\View; -use Html; use HtmlArmor; use IContextSource; -use Linker; use LogicException; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\Consequences\ConsequencesRegistry; @@ -20,12 +18,14 @@ use MediaWiki\Extension\AbuseFilter\FilterProfiler; use MediaWiki\Extension\AbuseFilter\FilterStore; use MediaWiki\Extension\AbuseFilter\InvalidImportDataException; use MediaWiki\Extension\AbuseFilter\SpecsFormatter; +use MediaWiki\Html\Html; +use MediaWiki\Linker\Linker; use MediaWiki\Linker\LinkRenderer; use MediaWiki\MainConfigNames; use MediaWiki\Permissions\PermissionManager; +use MediaWiki\SpecialPage\SpecialPage; +use MediaWiki\Specials\SpecialBlock; use OOUI; -use SpecialBlock; -use SpecialPage; use UnexpectedValueException; use Wikimedia\Rdbms\LBFactory; use Xml; diff --git a/includes/View/AbuseFilterViewHistory.php b/includes/View/AbuseFilterViewHistory.php index 0d94aeba5..eede7850c 100644 --- a/includes/View/AbuseFilterViewHistory.php +++ b/includes/View/AbuseFilterViewHistory.php @@ -4,13 +4,13 @@ namespace MediaWiki\Extension\AbuseFilter\View; use HTMLForm; use IContextSource; -use Linker; use MediaWiki\Cache\LinkBatchFactory; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\Filter\FilterNotFoundException; use MediaWiki\Extension\AbuseFilter\FilterLookup; use MediaWiki\Extension\AbuseFilter\Pager\AbuseFilterHistoryPager; use MediaWiki\Extension\AbuseFilter\SpecsFormatter; +use MediaWiki\Linker\Linker; use MediaWiki\Linker\LinkRenderer; use MediaWiki\User\UserNameUtils; use OOUI; diff --git a/includes/View/AbuseFilterViewList.php b/includes/View/AbuseFilterViewList.php index 32755e289..bb44789e7 100644 --- a/includes/View/AbuseFilterViewList.php +++ b/includes/View/AbuseFilterViewList.php @@ -2,7 +2,6 @@ namespace MediaWiki\Extension\AbuseFilter\View; -use Html; use HTMLForm; use IContextSource; use MediaWiki\Cache\LinkBatchFactory; @@ -12,6 +11,7 @@ use MediaWiki\Extension\AbuseFilter\FilterProfiler; use MediaWiki\Extension\AbuseFilter\Pager\AbuseFilterPager; use MediaWiki\Extension\AbuseFilter\Pager\GlobalAbuseFilterPager; use MediaWiki\Extension\AbuseFilter\SpecsFormatter; +use MediaWiki\Html\Html; use MediaWiki\Linker\LinkRenderer; use OOUI; use StringUtils; diff --git a/includes/View/AbuseFilterViewRevert.php b/includes/View/AbuseFilterViewRevert.php index ebcb44688..3fd3be91e 100644 --- a/includes/View/AbuseFilterViewRevert.php +++ b/includes/View/AbuseFilterViewRevert.php @@ -2,10 +2,8 @@ namespace MediaWiki\Extension\AbuseFilter\View; -use Html; use HTMLForm; use IContextSource; -use Linker; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\ActionSpecifier; use MediaWiki\Extension\AbuseFilter\Consequences\Consequence\ReversibleConsequence; @@ -15,12 +13,14 @@ use MediaWiki\Extension\AbuseFilter\FilterLookup; use MediaWiki\Extension\AbuseFilter\SpecsFormatter; use MediaWiki\Extension\AbuseFilter\Variables\UnsetVariableException; use MediaWiki\Extension\AbuseFilter\Variables\VariablesBlobStore; +use MediaWiki\Html\Html; +use MediaWiki\Linker\Linker; use MediaWiki\Linker\LinkRenderer; +use MediaWiki\SpecialPage\SpecialPage; +use MediaWiki\Title\TitleValue; use MediaWiki\User\UserFactory; use Message; use PermissionsError; -use SpecialPage; -use TitleValue; use UnexpectedValueException; use UserBlockedError; use Wikimedia\Rdbms\LBFactory; diff --git a/includes/View/AbuseFilterViewTestBatch.php b/includes/View/AbuseFilterViewTestBatch.php index 6fe96ed9b..e1809b654 100644 --- a/includes/View/AbuseFilterViewTestBatch.php +++ b/includes/View/AbuseFilterViewTestBatch.php @@ -2,7 +2,6 @@ namespace MediaWiki\Extension\AbuseFilter\View; -use Html; use HTMLForm; use IContextSource; use LogEventsList; @@ -13,6 +12,7 @@ use MediaWiki\Extension\AbuseFilter\EditBox\EditBoxBuilderFactory; use MediaWiki\Extension\AbuseFilter\EditBox\EditBoxField; use MediaWiki\Extension\AbuseFilter\Parser\RuleCheckerFactory; use MediaWiki\Extension\AbuseFilter\VariableGenerator\VariableGeneratorFactory; +use MediaWiki\Html\Html; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Revision\RevisionRecord; use MediaWiki\Title\Title; diff --git a/includes/View/HideAbuseLog.php b/includes/View/HideAbuseLog.php index 5aa274677..3ab83970f 100644 --- a/includes/View/HideAbuseLog.php +++ b/includes/View/HideAbuseLog.php @@ -2,15 +2,15 @@ namespace MediaWiki\Extension\AbuseFilter\View; -use DeferredUpdates; -use Html; use HTMLForm; use IContextSource; use LogEventsList; use LogPage; use ManualLogEntry; +use MediaWiki\Deferred\DeferredUpdates; use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager; use MediaWiki\Extension\AbuseFilter\Pager\AbuseLogPager; +use MediaWiki\Html\Html; use MediaWiki\Linker\LinkRenderer; use MediaWiki\MediaWikiServices; use Wikimedia\Rdbms\LBFactory; diff --git a/includes/Watcher/EmergencyWatcher.php b/includes/Watcher/EmergencyWatcher.php index 77c7ddb67..be86d9f1b 100644 --- a/includes/Watcher/EmergencyWatcher.php +++ b/includes/Watcher/EmergencyWatcher.php @@ -2,10 +2,10 @@ namespace MediaWiki\Extension\AbuseFilter\Watcher; -use AutoCommitUpdate; -use DeferredUpdates; use InvalidArgumentException; use MediaWiki\Config\ServiceOptions; +use MediaWiki\Deferred\AutoCommitUpdate; +use MediaWiki\Deferred\DeferredUpdates; use MediaWiki\Extension\AbuseFilter\EchoNotifier; use MediaWiki\Extension\AbuseFilter\EmergencyCache; use MediaWiki\Extension\AbuseFilter\FilterLookup; diff --git a/includes/Watcher/UpdateHitCountWatcher.php b/includes/Watcher/UpdateHitCountWatcher.php index a3b2419f1..3f2049843 100644 --- a/includes/Watcher/UpdateHitCountWatcher.php +++ b/includes/Watcher/UpdateHitCountWatcher.php @@ -2,7 +2,7 @@ namespace MediaWiki\Extension\AbuseFilter\Watcher; -use DeferredUpdates; +use MediaWiki\Deferred\DeferredUpdates; use MediaWiki\Extension\AbuseFilter\CentralDBManager; use Wikimedia\Rdbms\IDatabase; use Wikimedia\Rdbms\LBFactory; diff --git a/maintenance/AddMissingLoggingEntries.php b/maintenance/AddMissingLoggingEntries.php index b6697d5d1..9c6bcba86 100644 --- a/maintenance/AddMissingLoggingEntries.php +++ b/maintenance/AddMissingLoggingEntries.php @@ -14,7 +14,7 @@ use LoggedUpdateMaintenance; use ManualLogEntry; use MediaWiki\Extension\AbuseFilter\AbuseFilterServices; use MediaWiki\Extension\AbuseFilter\Special\SpecialAbuseFilter; -use User; +use MediaWiki\User\User; /** * @codeCoverageIgnore diff --git a/maintenance/PurgeOldLogIPData.php b/maintenance/PurgeOldLogIPData.php index c38ac2938..4eee00827 100644 --- a/maintenance/PurgeOldLogIPData.php +++ b/maintenance/PurgeOldLogIPData.php @@ -11,7 +11,7 @@ require_once "$IP/maintenance/Maintenance.php"; // @codeCoverageIgnoreEnd use Maintenance; -use MWTimestamp; +use MediaWiki\Utils\MWTimestamp; class PurgeOldLogIPData extends Maintenance { public function __construct() { diff --git a/tests/phpunit/AbuseFilterConsequencesTest.php b/tests/phpunit/AbuseFilterConsequencesTest.php index a8aaa195d..e33f0fabb 100644 --- a/tests/phpunit/AbuseFilterConsequencesTest.php +++ b/tests/phpunit/AbuseFilterConsequencesTest.php @@ -6,7 +6,11 @@ use MediaWiki\Extension\AbuseFilter\FilterRunnerFactory; use MediaWiki\Extension\AbuseFilter\Hooks\Handlers\FilteredActionsHandler; use MediaWiki\Extension\AbuseFilter\Parser\AFPData; use MediaWiki\MediaWikiServices; +use MediaWiki\Status\Status; use MediaWiki\Storage\PageEditStash; +use MediaWiki\Title\Title; +use MediaWiki\User\User; +use MediaWiki\WikiMap\WikiMap; use Psr\Log\LoggerInterface; use Wikimedia\Timestamp\ConvertibleTimestamp; diff --git a/tests/phpunit/AbuseFilterCreateAccountTestTrait.php b/tests/phpunit/AbuseFilterCreateAccountTestTrait.php index 6e1939523..27d74788a 100644 --- a/tests/phpunit/AbuseFilterCreateAccountTestTrait.php +++ b/tests/phpunit/AbuseFilterCreateAccountTestTrait.php @@ -4,6 +4,7 @@ use MediaWiki\Extension\AbuseFilter\AbuseFilterPreAuthenticationProvider; use MediaWiki\Extension\AbuseFilter\AbuseFilterServices; use MediaWiki\MediaWikiServices; use MediaWiki\Page\PageReferenceValue; +use MediaWiki\User\User; /** * This trait can be used to create accounts in integration tests. diff --git a/tests/phpunit/AbuseFilterUploadTestTrait.php b/tests/phpunit/AbuseFilterUploadTestTrait.php index 1119a8809..63f6da23c 100644 --- a/tests/phpunit/AbuseFilterUploadTestTrait.php +++ b/tests/phpunit/AbuseFilterUploadTestTrait.php @@ -2,6 +2,7 @@ use MediaWiki\MediaWikiServices; use MediaWiki\Request\FauxRequest; +use MediaWiki\User\User; /** * This trait can be used to perform uploads in integration tests. diff --git a/tests/phpunit/LazyVariableComputerDBTest.php b/tests/phpunit/LazyVariableComputerDBTest.php index dca9a1c16..e81b06ad3 100644 --- a/tests/phpunit/LazyVariableComputerDBTest.php +++ b/tests/phpunit/LazyVariableComputerDBTest.php @@ -4,6 +4,7 @@ use MediaWiki\Extension\AbuseFilter\AbuseFilterServices; use MediaWiki\Extension\AbuseFilter\Variables\LazyLoadedVariable; use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; use MediaWiki\Permissions\UltimateAuthority; +use MediaWiki\Title\Title; use MediaWiki\User\UserIdentityValue; /** diff --git a/tests/phpunit/RCVariableGeneratorTest.php b/tests/phpunit/RCVariableGeneratorTest.php index d1978d344..1d8411246 100644 --- a/tests/phpunit/RCVariableGeneratorTest.php +++ b/tests/phpunit/RCVariableGeneratorTest.php @@ -1,9 +1,12 @@