wiki.techinc.nl/includes
Brian Wolff bec8dada48 Clarify generate-html and make ParserOutput behave as expected
Previously:
* It was unclear that generate-html is an optional optimization
* Most of MediaWiki core was doing $parserOutput->setText('') if
html wasn't generated. However this is wrong and will cause
$parserOutput->hasText() to return true and also potentially cause
cache pollution if a content handler both does that and supports
parser cache (Like MassMessage; see T299896)
* The default value of mText in the constructor was '', and most
of the time MW used that default. This doesn't seem right. If
setText() is never called, the ParserOutput should not be considered
to have text
* It was impossible to set mText to null, as $parserOutput->setText(null)
was a no-op. Docs implied you were supposed to do this, so it was very
confusing.

This patch clarifies docs, changes the default value for ParserOutput::$mText
from '' to null, and makes $parserOutput->setText(null) do what you
expect it to. The last two are arguably breaking changes, although
the previous behaviours were unexpected, mostly undocumented and
based on a code search do not appear to be relied on.

It seems like the main reason this only broke MassMessage is most
content handlers either don't support generateHtml, or they don't
support parser cache.

Bug: T306591
Change-Id: I49cdf21411c6b02ac9a221a13393bebe17c7871e
Depends-On: I68ad491735b2df13951399312a4f9c37b63a08fa
2022-05-03 11:23:08 +02:00
..
actions Merge "Use MainConfigNames instead of string literals, #4" 2022-04-27 10:25:59 +00:00
api Localisation updates from https://translatewiki.net. 2022-05-03 08:32:17 +02:00
auth Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
block Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
cache Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
changes changes: Replace deprecated User::getOption 2022-04-29 21:51:20 +02:00
changetags Merge "changetags: Remove "hits" key from exported RCFilters module data" 2022-04-27 23:03:32 +00:00
collation Use str_starts_with/str_ends_with 2022-05-02 10:59:58 +03:00
CommentFormatter phan: Remove PhanPossiblyUndeclaredVariable suppression 2022-03-30 19:47:15 +00:00
composer
config phan: Disable null_casts_as_any_type setting 2022-03-21 18:25:07 +00:00
content Clarify generate-html and make ParserOutput behave as expected 2022-05-03 11:23:08 +02:00
context Use MainConfigNames instead of string literals, #2 2022-04-13 18:55:46 +03:00
dao
db Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
debug Merge "debug: Fix $wgDebugRawPage to work with PSR-3 debug logging" 2022-04-13 00:49:05 +00:00
deferred Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
diff Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
edit
editpage Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
exception rdbms: make automatic connection recovery more robust 2022-04-14 11:09:31 +10:00
export Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
externalstore rdbms: Fold MaintainableDBConnRef into DBConnRef 2022-04-14 01:57:11 +02:00
filebackend Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
filerepo Use str_starts_with/str_ends_with 2022-05-02 10:59:58 +03:00
gallery Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
historyblob historyblob: Improve param and property documentation 2022-03-08 23:45:44 +00:00
Hook Merge "Fix various documentation related to null types (part II)" 2022-03-09 22:42:42 +00:00
HookContainer Create ParserFetchTemplateData hook 2022-03-28 17:25:34 -04:00
htmlform Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
http Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
import Use MainConfigNames instead of string literals 2022-04-11 17:53:27 +03:00
installer Localisation updates from https://translatewiki.net. 2022-05-02 08:04:55 +02:00
interwiki Merge "interwiki: Adjust documentation for InterwikiLookup::getAllPrefixes" 2022-03-09 22:28:04 +00:00
jobqueue Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
json Type hints for ArrayAccess and JsonSerializable 2022-04-11 15:06:27 +03:00
language Merge "Use MainConfigNames instead of string literals, #4" 2022-04-27 10:25:59 +00:00
languages Add Okinawan (ryu) to Names.php 2022-04-28 12:25:39 +03:00
libs Merge "IResultWrapper::next() now returns void" 2022-05-03 05:59:56 +00:00
linkeddata
linker Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
logging Merge "logging: Use MainConfigNames constants" 2022-04-26 09:23:54 +00:00
mail Use MainConfigNames instead of string literals, #2 2022-04-13 18:55:46 +03:00
media Merge "Use copy if symlink fails" 2022-04-30 14:31:08 +00:00
Message
Navigation
objectcache Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
page Merge "Remove access to config globals from more classes" 2022-04-29 11:54:06 +00:00
pager pager: Improve Y2K38 check to keep leading zero in 3-digit years 2022-04-13 19:52:19 +02:00
ParamValidator/TypeDef UserDef: typo fix ("prefic" -> "prefix") 2022-04-28 19:50:46 +00:00
parser Clarify generate-html and make ParserOutput behave as expected 2022-05-03 11:23:08 +02:00
password Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
Permissions Don't consult ActionFactory for pages that can't exist 2022-04-29 08:54:29 -04:00
poolcounter Remove access to config globals from more classes 2022-04-28 18:36:28 +03:00
preferences Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
profiler profiler: Remove deprecated 'trace' feature in SectionProfiler 2022-04-29 11:18:50 +00:00
rcfeed Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
registration Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
resourceloader Merge "Use str_starts_with/str_ends_with" 2022-05-03 02:37:12 +00:00
Rest Merge "Use str_starts_with/str_ends_with" 2022-05-03 02:37:12 +00:00
Revision Merge "RevisionStore::getRelativeRevision: use the supplied timestamp, if any" 2022-03-22 23:01:04 +00:00
revisiondelete Use MainConfigNames instead of string literals, #2 2022-04-13 18:55:46 +03:00
revisionlist phan: Disable null_casts_as_any_type setting 2022-03-21 18:25:07 +00:00
search Use str_starts_with/str_ends_with 2022-05-02 10:59:58 +03:00
session Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
Settings Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
shell Use MainConfigNames instead of string literals, #2 2022-04-13 18:55:46 +03:00
site Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
skins Remove access to config globals from more classes 2022-04-28 18:36:28 +03:00
sparql Replace some more usages of Wikimedia\(suppress|restore)Warnings() 2022-02-24 20:27:46 +00:00
specialpage Remove access to config globals from more classes 2022-04-28 18:36:28 +03:00
specials Merge "IResultWrapper::next() now returns void" 2022-05-03 05:59:56 +00:00
Storage Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
templates
tidy Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
title Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
upload Merge "Add us-ascii to safeXmlEncodings" 2022-04-27 12:44:05 +00:00
user IResultWrapper::next() now returns void 2022-05-02 10:43:51 +03:00
utils Merge "Use str_starts_with/str_ends_with" 2022-05-03 02:37:12 +00:00
watcheditem Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
watchlist Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
widget
xml Remove access to config globals from more classes 2022-04-28 18:36:28 +03:00
.htaccess
ActorMigration.php
ActorMigrationBase.php
AutoLoader.php Autoload vendor from AutoLoader, not Setup 2022-04-28 20:36:44 +03:00
BadFileLookup.php
BootstrapHelperFunctions.php installer: Simplify wfDetectLocalSettingsFile and document gotchass 2022-03-01 17:43:15 +00:00
CategoriesRdf.php phan: Disable scalar_implicit_cast setting 2022-03-18 18:52:24 +00:00
Category.php
CategoryViewer.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
CommentStore.php phan: Remove PhanPossiblyUndeclaredVariable suppression 2022-03-30 19:47:15 +00:00
CommentStoreComment.php CommentStore: Add documentation defgroup/ingroup annotations 2020-07-25 05:42:20 +00:00
config-merge-strategies.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
config-schema.php Merge "Drop $wgMultiContentRevisionSchemaMigrationStage config" 2022-04-14 19:13:37 +00:00
ConfiguredReadOnlyMode.php
ContentSecurityPolicy.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
DefaultSettings.php Merge "Drop $wgMultiContentRevisionSchemaMigrationStage config" 2022-04-14 19:13:37 +00:00
DefaultSettings.template Generate DefaultSettings.php from schema 2022-03-18 10:25:52 +01:00
Defines.php Use UrlUtils in Parser 2022-04-28 17:14:51 +03:00
DeprecatedGlobal.php
DerivativeRequest.php
DevelopmentSettings.php debug: Fix $wgDebugRawPage to work with PSR-3 debug logging 2022-04-13 00:29:40 +00:00
DummyLinker.php
EditPage.php TempUser EditPage and permissions 2022-04-26 14:10:53 +10:00
Emptiable.php
EventRelayerGroup.php
ExtensionInfo.php
FauxRequest.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
FauxRequestUpload.php
FauxResponse.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
FeedUtils.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
FileDeleteForm.php SpecialDelete: check permissions again when deleting 2022-04-11 12:47:47 -04:00
ForeignResourceManager.php Avoid use of null, bool or Status in log messages 2022-03-02 22:45:10 +00:00
ForkController.php
FormOptions.php Type hints for ArrayAccess and JsonSerializable 2022-04-11 15:06:27 +03:00
GitInfo.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
GlobalFunctions.php Remove deprecated global function wfGetLB() 2022-04-14 04:28:15 +00:00
HeaderCallback.php
Hooks.php
Html.php Drop messagebox, warningbox, errorbox classes 2022-04-11 17:40:04 +00:00
Linker.php Use str_starts_with/str_ends_with 2022-05-02 10:59:58 +03:00
LinkFilter.php
ListToggle.php
MagicWord.php Fix various documentation related to null types 2022-02-26 10:31:24 +01:00
MagicWordArray.php
MagicWordFactory.php
MainConfigNames.php Merge "Drop $wgMultiContentRevisionSchemaMigrationStage config" 2022-04-14 19:13:37 +00:00
MainConfigNames.template Generate config name constants. 2022-03-18 10:32:58 +01:00
MainConfigSchema.php Fix documentation of includes/languages/data/Names.php 2022-04-23 20:12:14 +00:00
MediaWiki.php Replace Action::getActionName by IContextSource::getActionName 2022-04-15 23:25:25 +02:00
MediaWikiServices.php TempUser infrastructure and services 2022-04-14 09:23:55 +10:00
MediaWikiVersionFetcher.php
MergeHistory.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
MovePage.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
MWGrants.php
MWNamespace.php
MWTimestamp.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
NoLocalSettings.php
OrderedStreamingForkController.php
OutputHandler.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
OutputPage.php Merge "Prepare for deprecation of Skin::bottomScripts" 2022-04-18 18:05:50 +00:00
PageProps.php phan: Remove PhanPossiblyUndeclaredVariable suppression 2022-03-30 19:47:15 +00:00
PathRouter.php
PHPVersionCheck.php Prepare active branch following REL1_38 cut, labelling as 1.39-alpha 2022-03-14 21:50:17 -04:00
Pingback.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
ProtectionForm.php ProtectionForm: Remove usage of deprecated Title function 2022-04-13 21:19:49 +00:00
ProxyLookup.php
RawMessage.php
ReadOnlyMode.php
ServiceWiring.php Use UrlUtils in Parser 2022-04-28 17:14:51 +03:00
Setup.php Autoload vendor from AutoLoader, not Setup 2022-04-28 20:36:44 +03:00
SetupDynamicConfig.php Test dynamic configuration logic 2022-04-12 15:21:35 +03:00
SiteConfiguration.php Use str_starts_with/str_ends_with 2022-05-02 10:59:58 +03:00
SiteStats.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
SiteStatsInit.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
Status.php Status: Ensure MessageLocalizer is used if provided 2022-03-08 01:50:37 +00:00
StreamFile.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
StubGlobalUser.php
StubObject.php Use updated ObjectFactory namespace 2022-03-09 23:04:51 +00:00
StubUserLang.php
TemplateParser.php Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
TemplatesOnThisPageFormatter.php Remove usage of protection related deprecated Title function 2022-04-14 21:42:55 +00:00
Title.php Title: Hard deprecate Title::getSelectFields() 2022-04-27 10:59:18 +01:00
TitleArray.php
TitleArrayFromResult.php IResultWrapper::next() now returns void 2022-05-02 10:43:51 +03:00
TitleFactory.php
TrackingCategories.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
WebRequest.php Use str_starts_with/str_ends_with 2022-05-02 10:59:58 +03:00
WebRequestUpload.php
WebResponse.php Use name constants to access config settings. 2022-04-07 13:02:28 +02:00
WebStart.php Define MW_INSTALL_PATH constant and BaseDirectory config. 2022-03-04 14:18:27 +01:00
WikiMap.php
WikiReference.php