Use namespaced classes

Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: Ia08d43b3973a12b8e0628c8552bee1c4b702f249
This commit is contained in:
Umherirrender 2024-06-10 22:35:51 +02:00
parent c90200d24b
commit b985813c56
11 changed files with 31 additions and 30 deletions

View file

@ -2,6 +2,7 @@
// @phpcs:disable MediaWiki.Files.ClassMatchesFilename.NotMatch // @phpcs:disable MediaWiki.Files.ClassMatchesFilename.NotMatch
use MediaWiki\Context\ContextSource;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
/** /**

View file

@ -14,17 +14,17 @@ use ApiUsageException;
use Language; use Language;
use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface; use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\Message\Message;
use MediaWiki\Request\WebRequest;
use MediaWiki\Rest\HttpException; use MediaWiki\Rest\HttpException;
use MediaWiki\Rest\LocalizedHttpException; use MediaWiki\Rest\LocalizedHttpException;
use MediaWiki\Revision\RevisionRecord; use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use Message;
use NullStatsdDataFactory; use NullStatsdDataFactory;
use PrefixingStatsdDataFactoryProxy; use PrefixingStatsdDataFactoryProxy;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
use Throwable; use Throwable;
use WebRequest;
trait ApiParsoidTrait { trait ApiParsoidTrait {

View file

@ -15,12 +15,13 @@ use ApiBlockInfoTrait;
use ApiMain; use ApiMain;
use ApiResult; use ApiResult;
use Article; use Article;
use Config;
use ContentHandler; use ContentHandler;
use DerivativeContext;
use ExtensionRegistry; use ExtensionRegistry;
use IBufferingStatsdDataFactory; use IBufferingStatsdDataFactory;
use MediaWiki\Config\Config;
use MediaWiki\Content\Transform\ContentTransformer; use MediaWiki\Content\Transform\ContentTransformer;
use MediaWiki\Context\DerivativeContext;
use MediaWiki\Context\RequestContext;
use MediaWiki\EditPage\EditPage; use MediaWiki\EditPage\EditPage;
use MediaWiki\EditPage\IntroMessageBuilder; use MediaWiki\EditPage\IntroMessageBuilder;
use MediaWiki\EditPage\PreloadedContentBuilder; use MediaWiki\EditPage\PreloadedContentBuilder;
@ -36,12 +37,11 @@ use MediaWiki\SpecialPage\SpecialPageFactory;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use MediaWiki\User\Options\UserOptionsLookup; use MediaWiki\User\Options\UserOptionsLookup;
use MediaWiki\User\TempUser\TempUserCreator; use MediaWiki\User\TempUser\TempUserCreator;
use MediaWiki\User\User;
use MediaWiki\User\UserFactory; use MediaWiki\User\UserFactory;
use MediaWiki\User\UserIdentity; use MediaWiki\User\UserIdentity;
use MediaWiki\Watchlist\WatchlistManager; use MediaWiki\Watchlist\WatchlistManager;
use MessageLocalizer; use MessageLocalizer;
use RequestContext;
use User;
use Wikimedia\Assert\Assert; use Wikimedia\Assert\Assert;
use Wikimedia\ParamValidator\ParamValidator; use Wikimedia\ParamValidator\ParamValidator;
use WikitextContent; use WikitextContent;

View file

@ -15,15 +15,17 @@ use ApiMain;
use BagOStuff; use BagOStuff;
use ContentHandler; use ContentHandler;
use Deflate; use Deflate;
use DerivativeContext;
use DifferenceEngine; use DifferenceEngine;
use ExtensionRegistry; use ExtensionRegistry;
use FlaggablePageView; use FlaggablePageView;
use IBufferingStatsdDataFactory; use IBufferingStatsdDataFactory;
use IDBAccessObject; use IDBAccessObject;
use MediaWiki\Context\DerivativeContext;
use MediaWiki\Context\RequestContext;
use MediaWiki\HookContainer\HookContainer; use MediaWiki\HookContainer\HookContainer;
use MediaWiki\Logger\LoggerFactory; use MediaWiki\Logger\LoggerFactory;
use MediaWiki\Page\WikiPageFactory; use MediaWiki\Page\WikiPageFactory;
use MediaWiki\Parser\Sanitizer;
use MediaWiki\Request\DerivativeRequest; use MediaWiki\Request\DerivativeRequest;
use MediaWiki\Revision\SlotRecord; use MediaWiki\Revision\SlotRecord;
use MediaWiki\SpecialPage\SpecialPageFactory; use MediaWiki\SpecialPage\SpecialPageFactory;
@ -31,8 +33,6 @@ use MediaWiki\Storage\PageEditStash;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use MediaWiki\User\UserIdentity; use MediaWiki\User\UserIdentity;
use ObjectCache; use ObjectCache;
use RequestContext;
use Sanitizer;
use SkinFactory; use SkinFactory;
use Wikimedia\ParamValidator\ParamValidator; use Wikimedia\ParamValidator\ParamValidator;

View file

@ -19,7 +19,7 @@ use MediaWiki\Rest\Handler\Helper\PageRestHelperFactory;
use MediaWiki\Revision\MutableRevisionRecord; use MediaWiki\Revision\MutableRevisionRecord;
use MediaWiki\Revision\RevisionRecord; use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Revision\SlotRecord; use MediaWiki\Revision\SlotRecord;
use User; use MediaWiki\User\User;
use Wikimedia\Bcp47Code\Bcp47Code; use Wikimedia\Bcp47Code\Bcp47Code;
use WikitextContent; use WikitextContent;

View file

@ -11,51 +11,51 @@
namespace MediaWiki\Extension\VisualEditor; namespace MediaWiki\Extension\VisualEditor;
use Article; use Article;
use Config;
use DeferredUpdates;
use ExtensionRegistry; use ExtensionRegistry;
use Html;
use HTMLForm;
use IContextSource;
use Language; use Language;
use MediaWiki\Actions\ActionEntryPoint; use MediaWiki\Actions\ActionEntryPoint;
use MediaWiki\Auth\Hook\UserLoggedInHook; use MediaWiki\Auth\Hook\UserLoggedInHook;
use MediaWiki\ChangeTags\Hook\ChangeTagsListActiveHook; use MediaWiki\ChangeTags\Hook\ChangeTagsListActiveHook;
use MediaWiki\ChangeTags\Hook\ListDefinedTagsHook; use MediaWiki\ChangeTags\Hook\ListDefinedTagsHook;
use MediaWiki\Config\Config;
use MediaWiki\Context\IContextSource;
use MediaWiki\Context\RequestContext;
use MediaWiki\Deferred\DeferredUpdates;
use MediaWiki\Diff\Hook\DifferenceEngineViewHeaderHook; use MediaWiki\Diff\Hook\DifferenceEngineViewHeaderHook;
use MediaWiki\Diff\Hook\TextSlotDiffRendererTablePrefixHook; use MediaWiki\Diff\Hook\TextSlotDiffRendererTablePrefixHook;
use MediaWiki\EditPage\EditPage; use MediaWiki\EditPage\EditPage;
use MediaWiki\Extension\VisualEditor\EditCheck\ApiEditCheckReferenceUrl; use MediaWiki\Extension\VisualEditor\EditCheck\ApiEditCheckReferenceUrl;
use MediaWiki\Hook\BeforeInitializeHook; use MediaWiki\Hook\BeforeInitializeHook;
use MediaWiki\Hook\BeforePageDisplayHook;
use MediaWiki\Hook\CustomEditorHook; use MediaWiki\Hook\CustomEditorHook;
use MediaWiki\Hook\EditPage__showEditForm_fieldsHook; use MediaWiki\Hook\EditPage__showEditForm_fieldsHook;
use MediaWiki\Hook\MakeGlobalVariablesScriptHook;
use MediaWiki\Hook\OutputPageBodyAttributesHook;
use MediaWiki\Hook\ParserTestGlobalsHook; use MediaWiki\Hook\ParserTestGlobalsHook;
use MediaWiki\Hook\RecentChange_saveHook; use MediaWiki\Hook\RecentChange_saveHook;
use MediaWiki\Hook\SkinEditSectionLinksHook; use MediaWiki\Hook\SkinEditSectionLinksHook;
use MediaWiki\Hook\SkinTemplateNavigation__UniversalHook; use MediaWiki\Hook\SkinTemplateNavigation__UniversalHook;
use MediaWiki\Html\Html;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\Output\Hook\BeforePageDisplayHook;
use MediaWiki\Output\Hook\MakeGlobalVariablesScriptHook;
use MediaWiki\Output\Hook\OutputPageBodyAttributesHook;
use MediaWiki\Output\OutputPage;
use MediaWiki\Preferences\Hook\GetPreferencesHook; use MediaWiki\Preferences\Hook\GetPreferencesHook;
use MediaWiki\Preferences\Hook\PreferencesFormPreSaveHook; use MediaWiki\Preferences\Hook\PreferencesFormPreSaveHook;
use MediaWiki\Request\WebRequest;
use MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook; use MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook;
use MediaWiki\ResourceLoader\Hook\ResourceLoaderRegisterModulesHook; use MediaWiki\ResourceLoader\Hook\ResourceLoaderRegisterModulesHook;
use MediaWiki\ResourceLoader\ResourceLoader; use MediaWiki\ResourceLoader\ResourceLoader;
use MediaWiki\SpecialPage\Hook\RedirectSpecialArticleRedirectParamsHook; use MediaWiki\SpecialPage\Hook\RedirectSpecialArticleRedirectParamsHook;
use MediaWiki\SpecialPage\SpecialPage;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use MediaWiki\User\User;
use MediaWiki\User\UserIdentity; use MediaWiki\User\UserIdentity;
use OOUI\ButtonGroupWidget; use OOUI\ButtonGroupWidget;
use OOUI\ButtonWidget; use OOUI\ButtonWidget;
use OutputPage;
use RecentChange; use RecentChange;
use RequestContext;
use Skin; use Skin;
use SkinTemplate; use SkinTemplate;
use SpecialPage;
use TextSlotDiffRenderer; use TextSlotDiffRenderer;
use User;
use WebRequest;
/** /**
* @phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName * @phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName

View file

@ -10,7 +10,9 @@
namespace MediaWiki\Extension\VisualEditor; namespace MediaWiki\Extension\VisualEditor;
use MediaWiki\SpecialPage\SpecialPage;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use MediaWiki\User\User;
use MediaWiki\Widget\TitleInputWidget; use MediaWiki\Widget\TitleInputWidget;
use OOUI\ActionFieldLayout; use OOUI\ActionFieldLayout;
use OOUI\ButtonWidget; use OOUI\ButtonWidget;
@ -18,8 +20,6 @@ use OOUI\FieldsetLayout;
use OOUI\FormLayout; use OOUI\FormLayout;
use OOUI\ProgressBarWidget; use OOUI\ProgressBarWidget;
use OOUI\TextInputWidget; use OOUI\TextInputWidget;
use SpecialPage;
use User;
class SpecialCollabPad extends SpecialPage { class SpecialCollabPad extends SpecialPage {

View file

@ -2,7 +2,7 @@
namespace MediaWiki\Extension\VisualEditor; namespace MediaWiki\Extension\VisualEditor;
use OutputPage; use MediaWiki\Output\OutputPage;
use Skin; use Skin;
/** /**

View file

@ -12,9 +12,9 @@ namespace MediaWiki\Extension\VisualEditor;
*/ */
use MediaWiki\HookContainer\HookContainer; use MediaWiki\HookContainer\HookContainer;
use MediaWiki\Output\OutputPage;
use MediaWiki\Page\ProperPageIdentity; use MediaWiki\Page\ProperPageIdentity;
use MediaWiki\User\UserIdentity; use MediaWiki\User\UserIdentity;
use OutputPage;
use Skin; use Skin;
class VisualEditorHookRunner implements class VisualEditorHookRunner implements

View file

@ -2,9 +2,9 @@
namespace MediaWiki\Extension\VisualEditor; namespace MediaWiki\Extension\VisualEditor;
use MediaWiki\Context\RequestContext;
use MediaWiki\Permissions\Authority; use MediaWiki\Permissions\Authority;
use MediaWiki\Rest\Handler\Helper\PageRestHelperFactory; use MediaWiki\Rest\Handler\Helper\PageRestHelperFactory;
use RequestContext;
/** /**
* @since 1.40 * @since 1.40

View file

@ -2,10 +2,10 @@
namespace MediaWiki\Extension\VisualEditor\Tests; namespace MediaWiki\Extension\VisualEditor\Tests;
use ApiTestCase;
use ExtensionRegistry; use ExtensionRegistry;
use HashConfig; use MediaWiki\Config\HashConfig;
use MediaWiki\Extension\VisualEditor\ApiVisualEditor; use MediaWiki\Extension\VisualEditor\ApiVisualEditor;
use MediaWiki\Tests\Api\ApiTestCase;
use Wikimedia\ScopedCallback; use Wikimedia\ScopedCallback;
/** /**