aboutsummaryrefslogtreecommitdiffstats
path: root/includes/content/Hook
Commit message (Collapse)AuthorAgeFilesLines
* Namespace all remaining files in includes/pageJames D. Forrester2025-03-183-3/+3
| | | | | Bug: T353458 Change-Id: I7a9c74f2106655d41ae029742090253f541bd4a6
* Namespace all remaining classes in includes/parserJames D. Forrester2024-10-151-1/+1
| | | | | Bug: T353458 Change-Id: If02cc9b1ff78e26c1cf8c91ee4695845eb133829
* Move Language and friends into Language namespaceJames D. Forrester2024-08-101-1/+1
| | | | | Bug: T353458 Change-Id: Id3202c0c4f4a2043bf97b7caee081acab684155c
* Move remaining four classes in includes/content into Content namespaceJames D. Forrester2024-08-108-8/+8
| | | | | Bug: T353458 Change-Id: Ia0f3e22078550be410c4b87faf6aa4eabe6e270d
* Add namespace and deprecation alias to JsonContentEbrahim Byagowi2024-05-201-1/+1
| | | | | | | | | This patch introduces a namespace declaration for the MediaWiki\Content to JsonContent and establishes a class alias marked as deprecated since version 1.43. Bug: T353458 Change-Id: I44abb1ab5bd1fabf9886dc1457e241d7cae068bc
* Namespace includes/contextJames D. Forrester2024-02-082-2/+2
| | | | | Bug: T353458 Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
* Stop unstubbing and passing $wgLang to onPageContentLanguage hook handlersAaron Schulz2024-01-151-1/+1
| | | | | | | | | All handlers in WMF-hosted repos no longer make use of nor type-hint against this field. For compatibility with such handlers, pass null and document the value as being deprecated and of type mixed. Bug: T299369 Change-Id: Ie192beb6018ed40e2bc1920b23802ea62d1b105c
* Namespace ParserOutputJames D. Forrester2023-12-144-4/+4
| | | | | | | Most used non-namespaced class! Bug: T353458 Change-Id: I4c2cbb0a808b3881a4d6ca489eee5d8c8ebf26cf
* doc: Fix variable name in ContentHandlerForModelIDHookUmherirrender2023-09-301-2/+2
| | | | Change-Id: I62075b95d8b6108f1ad6cea26794ac39ac213c9a
* content: Rename $output in ContentGetParserOutputHookUmherirrender2023-08-141-2/+2
| | | | | | This is a ParserOutput, $output is often used for OutputPage Change-Id: I98c62140db863243e0342b9747032dc425fccc83
* Reorg: Namespace the Title classJames D. Forrester2023-03-024-4/+4
| | | | | | | | | | | | | | | | | | | This is moderately messy. Process was principally: * xargs rg --files-with-matches '^use Title;' | grep 'php$' | \ xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1' * rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \ xargs rg --files-with-matches 'Title\b' | \ xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1' * composer fix Then manual fix-ups for a few files that don't have any use statements. Bug: T166010 Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
* Merge "content: Throw after onPageContentLanguage hook for invalid $pageLang"jenkins-bot2022-11-041-3/+1
|\
| * content: Throw after onPageContentLanguage hook for invalid $pageLangFomafix2022-11-041-3/+1
| | | | | | | | | | | | | | Passing other types than a Language object was hard deprecated in 1a21fcfd5bb, included in MediaWiki 1.38. Change-Id: I1d4611f440c84052a9f43c372c7645bb2f9efd6e
* | Various doc fixes about false and null on method arguments/return typesUmherirrender2022-11-031-1/+1
|/ | | | | | Doc-only changes Change-Id: Ice974b3ba41708859dfe646e94b31c5ebbf26410
* Make the doc building for search aware of the revisionDavid Causse2022-10-252-0/+43
| | | | | | | | | | | | | | | | | Added an optional RevisionRecord param to: - ContentHandler::getParserOutputForIndexing - ContentHandler::getDataForSearchIndex - the SearchDataForIndex hook So that they have a chance to build the content related to a specific revision. Ultimately we'd like to make this parameter mandatory. Bug: T317309 Depends-On: I8b220cd6c4aeeca1d924bdd527409b8602318944 Depends-On: I8616b611caab3f5fa97ff0e655b19c3034304597 Change-Id: I3298ce7591069eb32f624b2c9fbb6de58ae04a29
* Customise error message for invalid JSON, add hookSiddharth VP2022-08-261-0/+30
| | | | | | | | | | | | | When invalid JSON is being saved, change the error message from the generic "invalid-content-data" to "invalid-json-data" with the specific error passed as param. Allow extensions to hook into JSON validation, enabling them to apply additional validations for specific JSON files such as MediaWiki:*.json config files. The page identity is passed to the hook. Bug: T313254 Change-Id: If9590c29ed0b871b03a3db8f13e72ee9cfdd7e2b
* Remove deprecated hook 'SecondaryDataUpdate'.Roman Stolar2021-07-211-34/+0
| | | | | Bug: T232878 Change-Id: I4a795436e560a19c8918177edeb3c792eeb9dd72
* Use @deprecated annotation on hook interfaces, not functionsUmherirrender2021-05-171-3/+0
| | | | | | | | Use only one place to document the deprecation of hook interfaces/functions Bug: T282903 Change-Id: Ie7d2d7a50afe2897e5c2369f473a33ecaa821637
* phpcs: remove some unneeded suppressionsDannyS7122021-02-171-1/+0
| | | | | | | Were not removed in doc review following creation of hook interfaces. Fix line length where needed Change-Id: I2eafffcf3a1c40d0f5613a893c53e0aa14eed6a2
* Document hook names in hook interfaces.daniel2020-09-2712-0/+36
| | | | | Bug: T258665 Change-Id: Ifddbf57f8aa2e3eb0d5845601376cbafa08ed407
* Replace "@stable for implementation" with "@stable to implement"daniel2020-07-1311-11/+11
| | | | | | | | | | | For compliance with the new version of the table interface policy (T255803). This patch was created by an automated search & replace operation on the includes/ directory. Bug: T257789 Change-Id: I17e5e92e24c708ffc846945a136347670a3a20c7
* Hook interface type fixes, to fix Phan errorsTim Starling2020-05-052-4/+7
| | | | | | | | Phan flagged a lot of incorrect type hints when run against the call site migration patch. Bug: T240307 Change-Id: I698de5536446c241b200430198b21b72763b0c69
* Hook interface doc comment followupTim Starling2020-04-211-1/+1
| | | | | | Mostly just narrower array types. A handful of other errors fixed. Change-Id: Ied79d9e389867911bf83696dbb47f43305f8be7b
* docs: Hook interface doc comment reviewapaskulin2020-04-2112-88/+116
| | | | | | | | Edited doc comments for hook interfaces to improve consistency and add type hints. Bug: T246855 Change-Id: I38fa802463cd6f39bf5946dbbeb1b3ebaea604b2
* Automatically generated hook interfacesTim Starling2020-04-2012-0/+307
Add hook interfaces which were generated by a script which parses hooks.txt and identifies caller namespaces and directories. Hook interfaces are mostly placed in a Hook/ subdirectory relative to the caller location. When there are callers in multiple directories, a "primary" caller was manually selected. The exceptions to this are: * The source root, maintenance and tests, which use includes/Hook. Test hooks need to be autoloadable in a non-test request so that implementing test interfaces in a generic handler will not fail. * resources uses includes/resourceloader/Hook * The following third-level subdirectories had their hooks placed in the parent ../Hook: * includes/filerepo/file * includes/search/searchwidgets * includes/specials/forms * includes/specials/helpers * includes/specials/pagers Parameters marked as legacy references in hooks.txt are passed by value in the interfaces. Bug: T240307 Change-Id: I6efe2e7dd1f0c6a3d0f4d100a4c34e41f8428720