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::prepareSave( Content, PageRecord, int, int, UserIdentity ) // TODO: discuss if PageRecord is needed or we can just do PageIdentity/Reference
The process:
- Do the same as in the referenced patch for all the methods. -> Patch
- In all extensions where Content overriding classes override the method - override the ContentHandler method instead
- Wikibase (deployed) -> Patch
- ProofreadPage (deployed) -> Patch
- Scribunto (deployed) -> Patch
- TemplateStyles (deployed) -> Patch
- Translate (deployed) -> Patch
- examples -> Patch
- StructuredNavigation -> T294569: [StructuredNavigation extension] Move Content::prepareSave method that don't belong in Content to ContentHandler
- TEI -> T294572: Move Content::prepareSave method that don't belong in Content to ContentHandler
- WikiLambda -> T294574: Move Content::prepareSave method that don't belong in Content to ContentHandler
- SemanticMediaWiki -> T294576: [SemanticMediaWiki] Move Content::prepareSave method that don't belong in Content to ContentHandler
- Replace all callers. Use ContentHandlerFactory to obtain a ContentHandler, not the Content::getContentHandler method
- core -> Patch
- ProofreadPage (deployed) -> Patch
- TemplateStyles (deployed) -> Patch
- AdvancedMeta -> T294638: Replace all callers of Content::prepareSave to ContentHandler::validateForRevision
- TEI -> T294572: Move Content::prepareSave method that don't belong in Content to ContentHandler
- WikiLambda -> T294574: Move Content::prepareSave method that don't belong in Content to ContentHandler
- SemanticMediaWiki -> T294576: [SemanticMediaWiki] Move Content::prepareSave method that don't belong in Content to ContentHandler
- Once all callers and overrides in extensions is done, do some hard deprecations. Add version parameter to MWDebug::detectDeprecatedOverride in deprecation check. -> Patch