wiki.techinc.nl/includes
Tim Starling 68c433bd23 Hooks::run() call site migration
Migrate all callers of Hooks::run() to use the new
HookContainer/HookRunner system.

General principles:
* Use DI if it is already used. We're not changing the way state is
  managed in this patch.
* HookContainer is always injected, not HookRunner. HookContainer
  is a service, it's a more generic interface, it is the only
  thing that provides isRegistered() which is needed in some cases,
  and a HookRunner can be efficiently constructed from it
  (confirmed by benchmark). Because HookContainer is needed
  for object construction, it is also needed by all factories.
* "Ask your friendly local base class". Big hierarchies like
  SpecialPage and ApiBase have getHookContainer() and getHookRunner()
  methods in the base class, and classes that extend that base class
  are not expected to know or care where the base class gets its
  HookContainer from.
* ProtectedHookAccessorTrait provides protected getHookContainer() and
  getHookRunner() methods, getting them from the global service
  container. The point of this is to ease migration to DI by ensuring
  that call sites ask their local friendly base class rather than
  getting a HookRunner from the service container directly.
* Private $this->hookRunner. In some smaller classes where accessor
  methods did not seem warranted, there is a private HookRunner property
  which is accessed directly. Very rarely (two cases), there is a
  protected property, for consistency with code that conventionally
  assumes protected=private, but in cases where the class might actually
  be overridden, a protected accessor is preferred over a protected
  property.
* The last resort: Hooks::runner(). Mostly for static, file-scope and
  global code. In a few cases it was used for objects with broken
  construction schemes, out of horror or laziness.

Constructors with new required arguments:
* AuthManager
* BadFileLookup
* BlockManager
* ClassicInterwikiLookup
* ContentHandlerFactory
* ContentSecurityPolicy
* DefaultOptionsManager
* DerivedPageDataUpdater
* FullSearchResultWidget
* HtmlCacheUpdater
* LanguageFactory
* LanguageNameUtils
* LinkRenderer
* LinkRendererFactory
* LocalisationCache
* MagicWordFactory
* MessageCache
* NamespaceInfo
* PageEditStash
* PageHandlerFactory
* PageUpdater
* ParserFactory
* PermissionManager
* RevisionStore
* RevisionStoreFactory
* SearchEngineConfig
* SearchEngineFactory
* SearchFormWidget
* SearchNearMatcher
* SessionBackend
* SpecialPageFactory
* UserNameUtils
* UserOptionsManager
* WatchedItemQueryService
* WatchedItemStore

Constructors with new optional arguments:
* DefaultPreferencesFactory
* Language
* LinkHolderArray
* MovePage
* Parser
* ParserCache
* PasswordReset
* Router

setHookContainer() now required after construction:
* AuthenticationProvider
* ResourceLoaderModule
* SearchEngine

Change-Id: Id442b0dbe43aba84bd5cf801d86dedc768b082c7
2020-05-30 14:23:28 +00:00
..
actions Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
api Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
auth Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
block Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
cache Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
changes Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
changetags Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
clientpool Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-11 01:59:00 +00:00
collation Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
compat
composer Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-11 01:59:00 +00:00
config
content Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
context Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
dao Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-11 01:59:00 +00:00
db objectcache: dependency inject LoadBalancer into SqlBagOStuff 2020-05-18 21:04:17 -07:00
debug Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-11 01:59:00 +00:00
deferred Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
diff Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
edit
editpage Merge "editpage: Fix misplaced return value in TextConflictHelper" 2020-05-25 11:07:56 +00:00
exception Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
export Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
externalstore ExternalStore: report cause of non-exception failure 2020-04-17 18:00:28 +02:00
filebackend mime: Update usage of MimeAnalyzer methods 2020-05-28 20:13:47 +00:00
filerepo Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
gallery Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
historyblob Fix more Squiz.Scope.MethodScope.Missing 2020-05-18 20:35:38 +00:00
Hook Hook interface type fixes, to fix Phan errors 2020-05-05 11:22:04 +10:00
HookContainer Merge "Make hook parameters use consistent name as the Hook interface" 2020-05-30 10:07:48 +00:00
htmlform Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
http Respect configured default HTTP timeouts, and introduce max timeouts 2020-05-21 09:30:57 +10:00
import Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
installer Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
interwiki Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
jobqueue Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
json Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-11 01:36:36 +01:00
language Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
libs Localisation updates from https://translatewiki.net. 2020-05-29 08:30:55 +02:00
linkeddata Fix SingleSpaceBeforeSingleLineComment 2020-05-11 00:57:11 +00:00
linker Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
logging Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
mail Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
media Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
Message UserNameUtils: use ITextFormatter instead of MessageLocalizer 2020-04-13 09:28:02 -07:00
Navigation
objectcache objectcache: dependency inject LoadBalancer into SqlBagOStuff 2020-05-18 21:04:17 -07:00
page Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
pager Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ParamValidator/TypeDef
parser Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
password Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
Permissions Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
poolcounter Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:14 +01:00
preferences Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
profiler
rcfeed Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
registration Merge "Add 'ParsoidModules' as a top-level core attribute in extension.json" 2020-05-29 00:16:01 +00:00
resourceloader Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
Rest Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
Revision Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
revisiondelete Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
revisionlist Add tests for RevisionList/RevisionItem classes 2020-05-12 09:36:44 -07:00
search Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
session Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
shell Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
site Fix more PSR12.Properties.ConstantVisibility.NotFound 2020-05-15 00:32:23 +01:00
skins Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
sparql Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-11 01:36:36 +01:00
specialpage Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
specials Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
Storage Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
templates
tidy
title Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
upload Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
user Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
utils mime: Document null return from MimeAnalyzer::improveTypeFromExtension() 2020-05-24 15:51:08 -04:00
watcheditem Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
widget
xml xml: Move condition check of var before creating XmlSelect object 2020-04-27 00:37:31 +01:00
.htaccess
ActorMigration.php Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-12 18:41:43 +00:00
AjaxDispatcher.php
AjaxResponse.php Explicit visibility modifiers to AjaxResponse.php 2020-05-10 02:00:26 +01:00
AutoLoader.php Explicit visibility modifiers to AutoLoader.php 2020-05-09 22:38:07 +00:00
Autopromote.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
BadFileLookup.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
CategoriesRdf.php Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-12 18:41:43 +00:00
Category.php Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-12 18:41:43 +00:00
CategoryFinder.php
CategoryViewer.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
CommentStore.php Merge "Use private instead of protected in CommentStore" 2020-05-23 10:16:18 +00:00
CommentStoreComment.php
ConfiguredReadOnlyMode.php
ContentSecurityPolicy.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
DefaultSettings.php Merge "ExtensionRegistry: Remove exporting and caching of wgExtensionCredits" 2020-05-28 19:12:06 +00:00
Defines.php Fix typo: 'the the' -> 'the' 2020-05-03 20:45:36 +01:00
DeprecatedGlobal.php
DerivativeRequest.php
DevelopmentSettings.php DevelopmentSettings: Disable resource limits 2020-03-29 21:11:12 +02:00
DummyLinker.php linker: Move Linker::normaliseSpecialPage to LinkRenderer class 2020-05-24 23:11:55 +00:00
EditPage.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
EventRelayerGroup.php
ExtensionInfo.php Allow extensions (et al) to have multiple LICENSE/COPYING files 2020-05-05 22:49:04 +00:00
FauxRequest.php
FauxResponse.php
FeedUtils.php FeedUtils: Remove use of Revision objects 2020-04-27 18:46:13 +00:00
FileDeleteForm.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ForeignResourceManager.php
ForkController.php Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-12 18:41:43 +00:00
FormOptions.php Fix PSR12.Properties.ConstantVisibility.NotFound in FormOptions.php 2020-05-15 21:12:06 +00:00
GitInfo.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
GlobalFunctions.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
HeaderCallback.php
Hooks.php Add Hooks::runner() 2020-05-05 11:23:31 +10:00
Html.php
Linker.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
LinkFilter.php Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-12 18:41:43 +00:00
ListToggle.php
MagicWord.php
MagicWordArray.php
MagicWordFactory.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MediaWiki.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MediaWikiServices.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MediaWikiVersionFetcher.php
MergeHistory.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MovePage.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MWGrants.php
MWNamespace.php
MWTimestamp.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
NoLocalSettings.php Fix version number not showing in NoLocalSettings.php 2020-05-26 02:14:10 +02:00
OrderedStreamingForkController.php
OutputHandler.php
OutputPage.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
PageProps.php Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-12 18:41:43 +00:00
PathRouter.php
PHPVersionCheck.php doxygen: Changed Doxygen tags causing warnings during documentation generation 2020-04-14 03:25:19 +00:00
Pingback.php Fix numerous PSR12.Properties.ConstantVisibility.NotFound 2020-05-12 18:41:43 +00:00
ProtectionForm.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ProxyLookup.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
RawMessage.php
ReadOnlyMode.php
Revision.php Hard deprecate Revision::getParentId and ::getVisibility 2020-05-27 23:35:18 +00:00
ServiceWiring.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
Setup.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
SiteConfiguration.php
SiteStats.php
SiteStatsInit.php
Status.php Fix param type for Status::msgInLang 2020-05-25 07:51:40 +00:00
StreamFile.php mime: Update usage of MimeAnalyzer methods 2020-05-28 20:13:47 +00:00
StubObject.php
StubUserLang.php
TemplateParser.php
TemplatesOnThisPageFormatter.php
Title.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
TitleArray.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
TitleArrayFromResult.php Explicit visibility modifiers in TitleArrayFromResult.php 2020-05-09 22:45:14 +00:00
TitleFactory.php
TrackingCategories.php
WebRequest.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
WebRequestUpload.php
WebResponse.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
WebStart.php
WikiMap.php Fix typo: 'the the' -> 'the' 2020-05-03 20:45:36 +01:00
WikiReference.php