Use namespaced classes

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

Change-Id: I325f5bab163cddf76dbf8d5a6eca35a7ed7b6df7
This commit is contained in:
Umherirrender 2024-06-08 23:46:45 +02:00
parent 8e9edd424e
commit 81d0c7bcd4
18 changed files with 32 additions and 24 deletions

View file

@ -7,6 +7,7 @@ use FSFileBackend;
use InvalidArgumentException; use InvalidArgumentException;
use MediaWiki\Auth\AuthenticationRequest; use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Auth\AuthManager; use MediaWiki\Auth\AuthManager;
use MediaWiki\Context\RequestContext;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest; use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha; use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha;
use MediaWiki\Html\Html; use MediaWiki\Html\Html;
@ -16,7 +17,6 @@ use MediaWiki\Utils\MWTimestamp;
use MediaWiki\WikiMap\WikiMap; use MediaWiki\WikiMap\WikiMap;
use NullLockManager; use NullLockManager;
use ObjectCache; use ObjectCache;
use RequestContext;
use StatusValue; use StatusValue;
use UnderflowException; use UnderflowException;

View file

@ -2,8 +2,8 @@
namespace MediaWiki\Extension\ConfirmEdit\FancyCaptcha; namespace MediaWiki\Extension\ConfirmEdit\FancyCaptcha;
use HTMLFormField;
use MediaWiki\Html\Html; use MediaWiki\Html\Html;
use MediaWiki\HTMLForm\HTMLFormField;
/** /**
* Captcha input field for FancyCaptcha that displays a question and returns the answer. * Captcha input field for FancyCaptcha that displays a question and returns the answer.

View file

@ -11,11 +11,11 @@
namespace MediaWiki\Extension\ConfirmEdit\QuestyCaptcha; namespace MediaWiki\Extension\ConfirmEdit\QuestyCaptcha;
use MediaWiki\Auth\AuthenticationRequest; use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Context\RequestContext;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest; use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha; use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha;
use MediaWiki\Extension\ConfirmEdit\Store\CaptchaStore; use MediaWiki\Extension\ConfirmEdit\Store\CaptchaStore;
use MediaWiki\Html\Html; use MediaWiki\Html\Html;
use RequestContext;
use Xml; use Xml;
class QuestyCaptcha extends SimpleCaptcha { class QuestyCaptcha extends SimpleCaptcha {

View file

@ -2,8 +2,8 @@
namespace MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha; namespace MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha;
use HTMLFormField;
use MediaWiki\Html\Html; use MediaWiki\Html\Html;
use MediaWiki\HTMLForm\HTMLFormField;
/** /**
* Creates a ReCaptcha v2 widget. Does not return any data; handling the data submitted by the * Creates a ReCaptcha v2 widget. Does not return any data; handling the data submitted by the

View file

@ -11,9 +11,9 @@ use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha;
use MediaWiki\Html\Html; use MediaWiki\Html\Html;
use MediaWiki\Language\RawMessage; use MediaWiki\Language\RawMessage;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\Message\Message;
use MediaWiki\Request\WebRequest; use MediaWiki\Request\WebRequest;
use MediaWiki\Status\Status; use MediaWiki\Status\Status;
use Message;
class ReCaptchaNoCaptcha extends SimpleCaptcha { class ReCaptchaNoCaptcha extends SimpleCaptcha {
// used for renocaptcha-edit, renocaptcha-addurl, renocaptcha-badlogin, renocaptcha-createaccount, // used for renocaptcha-edit, renocaptcha-addurl, renocaptcha-badlogin, renocaptcha-createaccount,

View file

@ -6,14 +6,14 @@ use ApiBase;
use ApiEditPage; use ApiEditPage;
use Content; use Content;
use ExtensionRegistry; use ExtensionRegistry;
use HTMLForm;
use IContextSource;
use IDBAccessObject; use IDBAccessObject;
use MailAddress; use MailAddress;
use MediaWiki\Auth\AuthenticationRequest; use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Cache\CacheKeyHelper; use MediaWiki\Cache\CacheKeyHelper;
use MediaWiki\Config\Config; use MediaWiki\Config\Config;
use MediaWiki\Config\ConfigException; use MediaWiki\Config\ConfigException;
use MediaWiki\Context\IContextSource;
use MediaWiki\Context\RequestContext;
use MediaWiki\EditPage\EditPage; use MediaWiki\EditPage\EditPage;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest; use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\CaptchaTriggers; use MediaWiki\Extension\ConfirmEdit\CaptchaTriggers;
@ -21,7 +21,9 @@ use MediaWiki\Extension\ConfirmEdit\Hooks\HookRunner;
use MediaWiki\Extension\ConfirmEdit\Store\CaptchaStore; use MediaWiki\Extension\ConfirmEdit\Store\CaptchaStore;
use MediaWiki\ExternalLinks\ExternalLinksLookup; use MediaWiki\ExternalLinks\ExternalLinksLookup;
use MediaWiki\ExternalLinks\LinkFilter; use MediaWiki\ExternalLinks\LinkFilter;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\Message\Message;
use MediaWiki\Output\OutputPage; use MediaWiki\Output\OutputPage;
use MediaWiki\Request\ContentSecurityPolicy; use MediaWiki\Request\ContentSecurityPolicy;
use MediaWiki\Request\WebRequest; use MediaWiki\Request\WebRequest;
@ -30,12 +32,10 @@ use MediaWiki\Revision\SlotRecord;
use MediaWiki\Status\Status; use MediaWiki\Status\Status;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use MediaWiki\User\User; use MediaWiki\User\User;
use Message;
use OOUI\FieldLayout; use OOUI\FieldLayout;
use OOUI\HiddenInputWidget; use OOUI\HiddenInputWidget;
use OOUI\NumberInputWidget; use OOUI\NumberInputWidget;
use ParserOptions; use ParserOptions;
use RequestContext;
use TextContent; use TextContent;
use UnexpectedValueException; use UnexpectedValueException;
use Wikimedia\IPUtils; use Wikimedia\IPUtils;

View file

@ -2,8 +2,8 @@
namespace MediaWiki\Extension\ConfirmEdit\Turnstile; namespace MediaWiki\Extension\ConfirmEdit\Turnstile;
use Html; use MediaWiki\Html\Html;
use HTMLFormField; use MediaWiki\HTMLForm\HTMLFormField;
/** /**
* Creates a Turnstile widget. Does not return any data; handling the data submitted by the * Creates a Turnstile widget. Does not return any data; handling the data submitted by the

View file

@ -4,16 +4,16 @@ namespace MediaWiki\Extension\ConfirmEdit\Turnstile;
use ApiBase; use ApiBase;
use FormatJson; use FormatJson;
use Html;
use MediaWiki\Auth\AuthenticationRequest; use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest; use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\Hooks; use MediaWiki\Extension\ConfirmEdit\Hooks;
use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha; use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha;
use MediaWiki\Html\Html;
use MediaWiki\Language\RawMessage; use MediaWiki\Language\RawMessage;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use Message; use MediaWiki\Message\Message;
use Status; use MediaWiki\Request\WebRequest;
use WebRequest; use MediaWiki\Status\Status;
class Turnstile extends SimpleCaptcha { class Turnstile extends SimpleCaptcha {
// used for turnstile-edit, turnstile-addurl, turnstile-badlogin, turnstile-createaccount, // used for turnstile-edit, turnstile-addurl, turnstile-badlogin, turnstile-createaccount,

View file

@ -5,17 +5,17 @@ namespace MediaWiki\Extension\ConfirmEdit\hCaptcha;
use ApiBase; use ApiBase;
use FormatJson; use FormatJson;
use MediaWiki\Auth\AuthenticationRequest; use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Context\RequestContext;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest; use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\Hooks; use MediaWiki\Extension\ConfirmEdit\Hooks;
use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha; use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha;
use MediaWiki\Html\Html; use MediaWiki\Html\Html;
use MediaWiki\Language\RawMessage; use MediaWiki\Language\RawMessage;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\Message\Message;
use MediaWiki\Request\ContentSecurityPolicy; use MediaWiki\Request\ContentSecurityPolicy;
use MediaWiki\Request\WebRequest; use MediaWiki\Request\WebRequest;
use MediaWiki\Status\Status; use MediaWiki\Status\Status;
use Message;
use RequestContext;
class HCaptcha extends SimpleCaptcha { class HCaptcha extends SimpleCaptcha {
// used for hcaptcha-edit, hcaptcha-addurl, hcaptcha-badlogin, hcaptcha-createaccount, // used for hcaptcha-edit, hcaptcha-addurl, hcaptcha-badlogin, hcaptcha-createaccount,

View file

@ -2,8 +2,8 @@
namespace MediaWiki\Extension\ConfirmEdit\hCaptcha; namespace MediaWiki\Extension\ConfirmEdit\hCaptcha;
use HTMLFormField;
use MediaWiki\Html\Html; use MediaWiki\Html\Html;
use MediaWiki\HTMLForm\HTMLFormField;
class HTMLHCaptchaField extends HTMLFormField { class HTMLHCaptchaField extends HTMLFormField {
/** @var string Public key parameter to be passed to hCaptcha. */ /** @var string Public key parameter to be passed to hCaptcha. */

View file

@ -6,9 +6,9 @@ use BagOStuff;
use MediaWiki\Extension\ConfirmEdit\CaptchaTriggers; use MediaWiki\Extension\ConfirmEdit\CaptchaTriggers;
use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha; use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use MediaWiki\User\User;
use MediaWiki\User\UserNameUtils; use MediaWiki\User\UserNameUtils;
use ObjectCache; use ObjectCache;
use User;
/** /**
* Helper to count login attempts per IP and per username. * Helper to count login attempts per IP and per username.

View file

@ -7,10 +7,9 @@ namespace MediaWiki\Extension\ConfirmEdit;
use ApiBase; use ApiBase;
use Content; use Content;
use ExtensionRegistry; use ExtensionRegistry;
use HTMLForm;
use IContextSource;
use MailAddress; use MailAddress;
use MediaWiki\Api\Hook\APIGetAllowedParamsHook; use MediaWiki\Api\Hook\APIGetAllowedParamsHook;
use MediaWiki\Context\IContextSource;
use MediaWiki\EditPage\EditPage; use MediaWiki\EditPage\EditPage;
use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha; use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha;
use MediaWiki\Hook\AlternateEditPreviewHook; use MediaWiki\Hook\AlternateEditPreviewHook;
@ -20,7 +19,9 @@ use MediaWiki\Hook\EditPageBeforeEditButtonsHook;
use MediaWiki\Hook\EmailUserFormHook; use MediaWiki\Hook\EmailUserFormHook;
use MediaWiki\Hook\EmailUserHook; use MediaWiki\Hook\EmailUserHook;
use MediaWiki\Html\Html; use MediaWiki\Html\Html;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWiki\Output\OutputPage; use MediaWiki\Output\OutputPage;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Permissions\Hook\TitleReadWhitelistHook; use MediaWiki\Permissions\Hook\TitleReadWhitelistHook;
use MediaWiki\ResourceLoader\Hook\ResourceLoaderRegisterModulesHook; use MediaWiki\ResourceLoader\Hook\ResourceLoaderRegisterModulesHook;
use MediaWiki\ResourceLoader\ResourceLoader; use MediaWiki\ResourceLoader\ResourceLoader;
@ -34,7 +35,6 @@ use MediaWiki\Title\Title;
use MediaWiki\User\User; use MediaWiki\User\User;
use MediaWiki\User\UserIdentity; use MediaWiki\User\UserIdentity;
use MessageSpecifier; use MessageSpecifier;
use ParserOutput;
use WANObjectCache; use WANObjectCache;
use Wikimedia\IPUtils; use Wikimedia\IPUtils;
use WikiPage; use WikiPage;

View file

@ -1,10 +1,10 @@
<?php <?php
use MediaWiki\Auth\AuthenticationRequestTestCase;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest; use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha; use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha;
use MediaWiki\Extension\ConfirmEdit\Store\CaptchaHashStore; use MediaWiki\Extension\ConfirmEdit\Store\CaptchaHashStore;
use MediaWiki\Extension\ConfirmEdit\Store\CaptchaStore; use MediaWiki\Extension\ConfirmEdit\Store\CaptchaStore;
use MediaWiki\Tests\Auth\AuthenticationRequestTestCase;
/** /**
* @covers \MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest * @covers \MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest

View file

@ -2,6 +2,7 @@
use MediaWiki\Auth\AuthManager; use MediaWiki\Auth\AuthManager;
use MediaWiki\Auth\UsernameAuthenticationRequest; use MediaWiki\Auth\UsernameAuthenticationRequest;
use MediaWiki\Context\RequestContext;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest; use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaPreAuthenticationProvider; use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaPreAuthenticationProvider;
use MediaWiki\Extension\ConfirmEdit\Auth\LoginAttemptCounter; use MediaWiki\Extension\ConfirmEdit\Auth\LoginAttemptCounter;

View file

@ -1,6 +1,9 @@
<?php <?php
use MediaWiki\Context\DerivativeContext;
use MediaWiki\Context\RequestContext;
use MediaWiki\Extension\ConfirmEdit\FancyCaptcha\HTMLFancyCaptchaField; use MediaWiki\Extension\ConfirmEdit\FancyCaptcha\HTMLFancyCaptchaField;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWiki\Request\FauxRequest; use MediaWiki\Request\FauxRequest;
use MediaWiki\Request\WebRequest; use MediaWiki\Request\WebRequest;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;

View file

@ -1,6 +1,9 @@
<?php <?php
use MediaWiki\Context\DerivativeContext;
use MediaWiki\Context\RequestContext;
use MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\HTMLReCaptchaNoCaptchaField; use MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\HTMLReCaptchaNoCaptchaField;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWiki\Request\FauxRequest; use MediaWiki\Request\FauxRequest;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;

View file

@ -1,7 +1,7 @@
<?php <?php
use MediaWiki\Auth\AuthenticationRequestTestCase;
use MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\ReCaptchaNoCaptchaAuthenticationRequest; use MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\ReCaptchaNoCaptchaAuthenticationRequest;
use MediaWiki\Tests\Auth\AuthenticationRequestTestCase;
/** /**
* @covers \MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\ReCaptchaNoCaptchaAuthenticationRequest * @covers \MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\ReCaptchaNoCaptchaAuthenticationRequest

View file

@ -1,6 +1,7 @@
<?php <?php
use MediaWiki\Config\Config; use MediaWiki\Config\Config;
use MediaWiki\Context\RequestContext;
use MediaWiki\Extension\ConfirmEdit\CaptchaTriggers; use MediaWiki\Extension\ConfirmEdit\CaptchaTriggers;
use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha; use MediaWiki\Extension\ConfirmEdit\SimpleCaptcha\SimpleCaptcha;
use MediaWiki\Request\WebRequest; use MediaWiki\Request\WebRequest;