wiki.techinc.nl/docs
Tim Starling a37adeff89 Annotate hook parameters that are references for legacy reasons.
In hooks.txt, annotate all parameters that are references for legacy
reasons with [&] instead of &.

This will be the canonical source of this information. After T240307
is complete, assignment through the reference (replacement) will have no
effect. So if any parameters are incorrectly annotated with [&],
extensions will break.

These changes are final, since T240307 will make it impossible to change
the reference type of an existing hook. The only recourse will be add a
new hook without the reference.

Full review notes:
* FileDeleteComplete: A case of inappropriate non-object references
  introduced by analogy: the local variables are not consulted after the
  hook is called. CodeSearch reveals that handlers already use non-ref
  params, presumably due to T193950
* BeforeInitialize: Replacing the title here would have some effect, but
  it is fetched from the context and not written back, so the result would
  be inconsistent. Inadvisable.
* InitializeArticleMaybeRedirect: $target and $article are certainly
  replaceable, but not the request-sourced variables $title and $request.
  The correct way to redirect is to use $target.
* IsTrustedProxy: $ip inappropriate scalar reference
* ResourceLoaderRegisterModules: The contract is pretty clear here,
  replacement would be difficult
* ActionBeforeFormDisplay: replacement seems inadvisable; no handlers in
  codesearch
* PageHistoryBeforeList: inadvisable, no callers replace
* UnwatchArticleComplete: $user was called with & but undocumented
* APIAfterExecute: seems safe from codesearch
* APIQueryGeneratorAfterExecute: no handlers
* User::mailPasswordInternal: handlers do not use ref params
* FetchChangesList: replacement would have no effect
* ParserFirstCallInit, ParserClearState, ParserBeforeStrip,
  ParserAfterStrip, ParserAfterParse, ParserBeforeInternalParse,
  InternalParseBeforeSanitize, InternalParseBeforeLinks, ParserBeforeTidy,
  ParserAfterTidy, ParserGetVariableValueVarCache,
  ParserGetVariableValueTs, ParserGetVariableValueSwitch,
  BeforeParserrenderImageGallery: undocumented reference
* BeforeParserrenderImageGallery: replacement seems inadvisable after
  mutation. No handlers.
* RevisionInsertComplete: undocumented reference
* SkinTemplateOutputPageBeforeExec: $tpl replacement would be
  inadvisable after mutation. CodeSearch shows many callers, I haven't
  reviewed them all, but a sampling shows $tpl->set() being the usual
  pattern
* SpecialPageBeforeFormDisplay: CodeSearch confirms this is harmless
* BlockIp: did CodeSearch to confirm that neither variable is replaced
* SpecialMovepageAfterMove: did CodeSearch
* UnblockUser: no handlers
* UndeleteForm::showRevision: extensions/Video actually tries to replace
  it, but forgot to declare the parameter as a reference. Filed T246408.
* ArticleEditUpdates: $editInfo is unused after the hook call
* PageContentSave: undocumented ref params. $mainContent is unused after
  hook call.
* ImageBeforeProduceHTML: $dummy is unused after hook execution. The rest
  could be altered

Bug: T193950
Change-Id: I6ddf54cb6812d2e292eca6d8e588364498c2fe73
2020-02-28 17:23:23 +11:00
..
databases
html
php-memcached Use [...] instead of array(...) in PHP comments and documentation 2019-06-17 21:15:09 +02:00
uidesign Remove traling double newlines from text files 2019-10-23 21:17:43 +02:00
contenthandler.md Remove ArticleContentViewCustom hook, deprecated and unused 2020-02-06 19:55:16 +00:00
database.md docs: Change docs/contenthandler.txt and docs/database.txt to markdown 2019-12-04 19:20:54 +00:00
deferred.txt
distributors.txt profiler: Remove ProfilerOutputDb and profileinfo.php entry point 2019-11-06 15:28:00 -05:00
export-0.1.xsd
export-0.2.xsd
export-0.3.xsd
export-0.4.xsd
export-0.5.xsd
export-0.6.xsd
export-0.7.xsd
export-0.8.xsd Miscellaneous documentation updates 2020-02-16 04:38:38 +00:00
export-0.9.xsd Miscellaneous documentation updates 2020-02-16 04:38:38 +00:00
export-0.10.xsd Miscellaneous documentation updates 2020-02-16 04:38:38 +00:00
export-0.11.xsd Miscellaneous documentation updates 2020-02-16 04:38:38 +00:00
export-demo.xml Fix common typos 2018-08-08 13:16:45 +02:00
extension.schema.v1.json Allow specifying autoloaded classes for tests 2019-12-10 21:39:30 +00:00
extension.schema.v2.json extension.schema.v2: Fix schemas for 'templates' 2020-02-25 01:18:26 +01:00
globals.txt docs: Remove outdated information from globals.txt 2018-10-14 19:13:03 +00:00
hooks.txt Annotate hook parameters that are references for legacy reasons. 2020-02-28 17:23:23 +11:00
Injection.md Miscellaneous documentation updates 2020-02-16 04:38:38 +00:00
Introduction.md Miscellaneous documentation updates 2020-02-16 04:38:38 +00:00
Language.md docs: Convert docs/language.txt and docs/injection.md to Markdown 2019-12-03 21:35:23 +02:00
LinkCache.md Add LinkBatchFactory to inject services into LinkBatch 2020-01-06 17:02:31 +01:00
Logger.md docs: Convert logger.txt and linkcache.txt to Markdown 2019-12-04 00:56:26 +00:00
magicword.md Miscellaneous documentation updates 2020-02-16 04:38:38 +00:00
maintenance.txt
memcached.md Implementation of Doxygen-friendly format 2019-12-04 21:08:15 +00:00
ontology.owl Specify licence of mediawiki ontology.owl 2019-03-04 16:12:13 +01:00
pageupdater.md docs: convert pageupdater and sitelist to markdown 2019-12-21 19:30:58 +01:00
README
schema.md docs: Update docs/schema.txt and docs/scripts.txt to markdown 2019-12-07 13:30:38 +00:00
sitelist-1.0.xsd
sitelist.md docs: convert pageupdater and sitelist to markdown 2019-12-21 19:30:58 +01:00
Skin.md Convert docs/skin.txt and docs/title.txt to Markdown 2019-12-09 20:31:43 +02:00
Title.md Miscellaneous documentation updates 2020-02-16 04:38:38 +00:00

/docs Directory README
======================

The 'docs' directory contain various text files that should help you understand
the most important parts of the code of MediaWiki. More in-depth documentation
can be found at:
  https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Code
  https://www.mediawiki.org/wiki/Special:MyLanguage/Developer_hub
API documentation is automatically generated and updated daily at:
  https://doc.wikimedia.org/mediawiki-core/master/php/html/

You can get a fresh version using 'make doc' or mwdocgen.php in the
../maintenance/ directory.


For end users, most of the documentation is located online at:
  https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents
Documentation for MediaWiki site administrators is at:
  https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents