Page MenuHomePhabricator

Move Content::getParserOutput method that don't belong in Content to ContentHandler
Closed, ResolvedPublic

Description

These methods need to move to new corresponding methods in ContentHandler. Here's a patch that does the first part of the work for Content::preSaveTransform.

The signature of the ContentHandler method should be:

  • ContentHandler::getParserOutput( Content, PageReference, ?int, ParserOptions, bool ) // TODO: discuss if generateHtml should be a new parser option
    • ContentHandler::fillParserOutput( Content, PageReference, ?int, ParserOptions, bool, ParserOutput ).
      • Move implementation of TextContent::getHtml to TextContentHandler::fillParserOutput ( The same with override classes ).

The process:

  • Do the same as in the referenced patch for all the methods.
  • In all extensions where Content overriding classes override the method getParserOutput - override the ContentHandler::fillParserOutput instead
  • In all extensions where AbstractContent overriding classes override the method fillParserOutput - override the ContentHandler method instead
  • Replace all callers. Use ContentRenderer to obtain a ContentHandler, not the Content::getContentHandler method
    • core -> Patch
    • Wikibase (deployed) -> Patch
    • FlaggedRevs (deployed) -> Patch
    • TemplateSandbox (deployed) -> Patch
    • FileImporter (deployed) -> Patch
    • Flow (deployed) -> Patch
    • MassMessage (deployed) -> Patch
    • SpamBlacklist (deployed) -> Patch
    • PageImages (deployed) -> Patch
    • SemanticMediaWiki -> Ticket
    • BlueSpiceSocialProfile -> Ticket
    • BlueSpiceSocialTopics -> Ticket
    • CognitiveProcessDesigner -> Ticket
    • ApprovedRevs -> Ticket
    • BlueSpiceDashboards -> Ticket
    • BlueSpiceEchoConnector -> Ticket
    • BlueSpiceExtendedSearch -> Ticket
    • BlueSpiceFoundation -> Ticket
    • BlueSpiceSMWConnector -> Ticket
    • BlueSpiceSocialWikiPage -> Ticket
    • CollaborationKit -> Ticket
    • ContentTransfer -> Ticket
    • DisplayTitle -> Ticket
    • DocBookExport -> Ticket
    • ParserMigration -> Ticket
  • Once all callers and overrides in extensions is done, do some hard deprecations.

Details

ProjectBranchLines +/-Subject
mediawiki/extensions/WikiLambdamaster+125 -119
mediawiki/coremaster+56 -34
mediawiki/extensions/PageImagesmaster+13 -5
mediawiki/extensions/Flowmaster+2 -2
mediawiki/extensions/SpamBlacklistmaster+7 -4
mediawiki/extensions/FileImportermaster+6 -3
mediawiki/extensions/Wikibasemaster+308 -287
mediawiki/extensions/WikibaseLexememaster+8 -1
mediawiki/extensions/WikibaseLexemeCirrusSearchmaster+7 -0
mediawiki/extensions/WikibaseCirrusSearchmaster+14 -0
mediawiki/coremaster+198 -129
mediawiki/extensions/WikibaseMediaInfomaster+1 -1
mediawiki/extensions/MassMessagemaster+5 -3
mediawiki/extensions/TemplateSandboxmaster+14 -5
mediawiki/extensions/FlaggedRevsmaster+10 -8
mediawiki/extensions/TemplateStylesmaster+45 -37
mediawiki/extensions/Scribuntomaster+125 -126
mediawiki/extensions/ProofreadPagemaster+254 -214
mediawiki/extensions/MassMessagemaster+214 -209
mediawiki/extensions/Newslettermaster+315 -293
mediawiki/extensions/BlueSpiceSocialProfilemaster+126 -131
mediawiki/coremaster+2 -1
mediawiki/extensions/EntitySchemamaster+118 -99
mediawiki/extensions/UploadWizardmaster+47 -39
mediawiki/extensions/Dashikimaster+5 -5
mediawiki/extensions/JsonConfigmaster+63 -51
mediawiki/extensions/Gadgetsmaster+22 -24
mediawiki/extensions/Flowmaster+104 -125
mediawiki/extensions/EventLoggingmaster+48 -46
mediawiki/coremaster+625 -319
mediawiki/coremaster+109 -15
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 726881 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] Override ContentHandler::fillParserOutput instead of Content::getParserOutput.

https://gerrit.wikimedia.org/r/726881

Change 730157 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/core@master] Fix reference to moved flag in phpdoc

https://gerrit.wikimedia.org/r/730157

Change 726925 merged by jenkins-bot:

[mediawiki/extensions/EntitySchema@master] Override ContentHandler::fillParserOutput instead of Content::fillParserOutput.

https://gerrit.wikimedia.org/r/726925

Change 730157 merged by jenkins-bot:

[mediawiki/core@master] Fix reference to moved flag in phpdoc

https://gerrit.wikimedia.org/r/730157

Change 728319 merged by jenkins-bot:

[mediawiki/extensions/Newsletter@master] Override ContentHandler::fillParserOutput instead of Content::fillParserOutput.

https://gerrit.wikimedia.org/r/728319

Change 730808 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/core@master] Replace Content::getParserOutput call to ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/730808

Change 727332 merged by jenkins-bot:

[mediawiki/extensions/MassMessage@master] Override ContentHandler::fillParserOutput instead of Content::fillParserOutput.

https://gerrit.wikimedia.org/r/727332

Change 720291 merged by jenkins-bot:

[mediawiki/extensions/ProofreadPage@master] Override ContentHandler::fillParserOutput instead of Content ::getParserOutput & ::fillParserOutput.

https://gerrit.wikimedia.org/r/720291

Change 728329 merged by jenkins-bot:

[mediawiki/extensions/Scribunto@master] Override ContentHandler::fillParserOutput instead of Content::fillParserOutput.

https://gerrit.wikimedia.org/r/728329

Change 726874 merged by jenkins-bot:

[mediawiki/extensions/TemplateStyles@master] Override ContentHandler::fillParserOutput instead of Content::getParserOutput and TextContent::getHtml().

https://gerrit.wikimedia.org/r/726874

Change 732275 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/FlaggedRevs@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732275

Change 732292 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/TemplateSandbox@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732292

Change 732301 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/FileImporter@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732301

Change 732305 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/Flow@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732305

Change 732308 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/MassMessage@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732308

Change 732312 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/SpamBlacklist@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732312

Change 725886 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Make MediaInfoContent::getEntityHolder public.

https://gerrit.wikimedia.org/r/725886

Change 730808 merged by jenkins-bot:

[mediawiki/core@master] Replace Content::getParserOutput call to ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/730808

Change 732275 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732275

Change 732292 merged by jenkins-bot:

[mediawiki/extensions/TemplateSandbox@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732292

Change 732308 merged by jenkins-bot:

[mediawiki/extensions/MassMessage@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732308

Change 725934 merged by jenkins-bot:

[mediawiki/extensions/WikibaseCirrusSearch@master] Add override method ::newEmptyContent.

https://gerrit.wikimedia.org/r/725934

Change 725935 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Add override method ::newEmptyContent.

https://gerrit.wikimedia.org/r/725935

Change 732675 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/core@master] Hard-deprecate Content::getParserOutput and AbstractContent::fillParserOutput.

https://gerrit.wikimedia.org/r/732675

Change 725874 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Make LexemeContent::getEntityHolder public. Add override method LexemeHandlerTest::newEmptyContent.

https://gerrit.wikimedia.org/r/725874

Change 725324 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Override ContentHandler::fillParserOutput instead of Content::getParserOutput.

https://gerrit.wikimedia.org/r/725324

Change 732721 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/PageImages@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732721

Change 732301 merged by jenkins-bot:

[mediawiki/extensions/FileImporter@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732301

Change 732305 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732305

Change 732312 merged by jenkins-bot:

[mediawiki/extensions/SpamBlacklist@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732312

Change 732721 merged by jenkins-bot:

[mediawiki/extensions/PageImages@master] Replace deprecated Content::getParserOutput call to new one ContentRenderer::getParserOutput

https://gerrit.wikimedia.org/r/732721

Change 732675 merged by jenkins-bot:

[mediawiki/core@master] Hard-deprecate Content::getParserOutput and AbstractContent::fillParserOutput.

https://gerrit.wikimedia.org/r/732675

Change 736462 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Migrate fillParserOutput() from Content to ContentHandler

https://gerrit.wikimedia.org/r/736462

Change 736462 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Migrate fillParserOutput() from Content to ContentHandler

https://gerrit.wikimedia.org/r/736462