Page MenuHomePhabricator

Move Content::preSaveTransform 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::preSaveTransform( Content, PageReference, UserIdentity, ParserOptions )

The process:

  • Do the same as in the referenced patch for all the methods.
  • In all extensions where Content overriding classes override the method - override the ContentHandler method instead
    • JsonContent
    • WikiLambda
    • CollaborationKit
    • ProofreadPage
    • MediaUploader
    • TEI
    • SemanticMediaWiki -> Issue, PR (not-deployed)
  • Replace all callers. Use ContentTransformer to obtain a ContentHandler::preSaveTransform, not the Content::getContentHandler method
  • Once all callers and overrides in extensions is done, do some hard deprecations.

Details

ProjectBranchLines +/-Subject
mediawiki/coremaster+12 -103
mediawiki/vendormaster+9 K -8 K
mediawiki/coremaster+75 -16
mediawiki/extensions/EventLoggingmaster+5 -2
mediawiki/extensions/ProofreadPagemaster+161 -102
mediawiki/extensions/CollaborationKitmaster+215 -204
mediawiki/extensions/TemplateSandboxmaster+23 -6
mediawiki/extensions/TEImaster+73 -60
mediawiki/vendormaster+11 -3
mediawiki/extensions/VisualEditormaster+18 -9
mediawiki/services/parsoidmaster+15 -11
mediawiki/extensions/Flowmaster+8 -7
mediawiki/extensions/FileImportermaster+10 -2
mediawiki/extensions/TwoColConflictmaster+11 -2
mediawiki/extensions/MediaUploadermaster+41 -31
mediawiki/extensions/JsonConfigmaster+23 -19
mediawiki/extensions/MassMessagemaster+8 -3
mediawiki/extensions/WikiLambdamaster+24 -21
mediawiki/coremaster+397 -145
Show related patches Customize query in gerrit

Event Timeline

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

[mediawiki/core@master] Move Content::preSaveTransform to ContentHandler

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

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

[mediawiki/extensions/ProofreadPage@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

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

[mediawiki/extensions/JsonConfig@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

Change 705780 merged by jenkins-bot:

[mediawiki/core@master] Move Content::preSaveTransform to ContentHandler

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

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

[mediawiki/extensions/WikiLambda@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

Change 708980 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

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

[mediawiki/extensions/TwoColConflict@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

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

[mediawiki/extensions/MassMessage@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 709467 merged by jenkins-bot:

[mediawiki/extensions/MassMessage@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

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

[mediawiki/extensions/EventLogging@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

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

[mediawiki/extensions/FileImporter@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

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

[mediawiki/extensions/Flow@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 708117 merged by jenkins-bot:

[mediawiki/extensions/JsonConfig@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

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

[mediawiki/extensions/CollaborationKit@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

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

[mediawiki/extensions/MediaUploader@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

Change 710038 merged by jenkins-bot:

[mediawiki/extensions/MediaUploader@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

This has broken the Wikisources who were neither notified nor tagged. Bit ugly.

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

[mediawiki/extensions/TEI@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

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

[mediawiki/extensions/TemplateSandbox@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

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

[mediawiki/extensions/VisualEditor@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 709433 merged by jenkins-bot:

[mediawiki/extensions/TwoColConflict@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

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

[mediawiki/services/parsoid@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

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

[mediawiki/vendor@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 709714 merged by jenkins-bot:

[mediawiki/extensions/FileImporter@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 709716 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 710935 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 710533 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 710937 abandoned by Roman Stolar:

[mediawiki/vendor@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

Reason:

vendor will be updated automatically when we bump parsoid version

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

Change 710220 merged by jenkins-bot:

[mediawiki/extensions/TEI@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

Change 710270 merged by jenkins-bot:

[mediawiki/extensions/TemplateSandbox@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 710014 merged by jenkins-bot:

[mediawiki/extensions/CollaborationKit@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

Change 708083 merged by jenkins-bot:

[mediawiki/extensions/ProofreadPage@master] Override ContentHandler::preSaveTransform instead of Content::preSaveTransform.

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

Change 709710 merged by jenkins-bot:

[mediawiki/extensions/EventLogging@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

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

[mediawiki/core@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

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

[mediawiki/core@master] Hard-deprecate Content::preSaveTransform.

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

Change 713822 merged by jenkins-bot:

[mediawiki/core@master] Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform

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

Change 714425 had a related patch set uploaded (by Sbailey; author: Sbailey):

[mediawiki/vendor@master] Bump parsoid to 0.14.0-a16

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

Change 714425 merged by jenkins-bot:

[mediawiki/vendor@master] Bump parsoid to 0.14.0-a16

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

Change 713826 merged by jenkins-bot:

[mediawiki/core@master] Hard-deprecate Content::preSaveTransform.

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