This is adding a lot of PC entries for pages that possibly won't ever
be visited. This is similar to what Refreshlinks job does and doesn't
save at all.
Bug: T285993
Change-Id: I68c14932d568795ab54074e073eab2a80517ed70
This also marks JsonContentHandler as stable to extend, which
was missing from the parent patch.
Bug: T275976
Change-Id: Ied8c2930017bc9ec28e522a774da1050b2b1ffde
Unused except for DeleteAction, which now uses a custom query (similar
to the one in ContentHandler::getAutoDeleteReason). Passing the
parameter is hence hard-deprecated, and it will be removed in 1.39.
Also escalate the exception logging from wfDebug to error, since we want
to know what exceptions are being caught.
Bug: T288282
Change-Id: I91ed9574da68bc7ff36e968f016da390b6d295ed
Update method name in ContentHandler, soft-deprecate method on Content.
This will require making a semi-backwards-incompatible
change no matter what, we don't really have a great way
of hard-deprecating overriding methods.
Replace all callers of Content::prepareSave in core.
Add tests for ContentHandler::validateSave.
Bug: T287159
Change-Id: I7f23e6e97b1c7d27a6aaefdb88b19b2fc6e8b3a8
Use ContentRenderer::getParserOutput instead.
Extensions defining a content model should override ContentHandler::fillParserOutput.
Update tests.
Bug: T287158
Change-Id: I1c71a8429806f1813a39f5807256b2eb9fb9901f
$generateHtml is now wrapped in the ContentParseParams, referring to it
by its old name is confusing.
Bug: T287158
Change-Id: I31e0a596881ecd7d3bea709ab3f8029779cb7f02
Hard deprecate other types than a Language object as return value in
parameter $pageLang of the hook PageContentLanguage. Other types are
deprecated since change a08fc9eed6 included in MediaWiki 1.33.
Change-Id: I92916be55baa4d25ec2b279cee17adb26dd139fb
Update/Create override classes of ContentHandler.
Soft-deprecate and remove method from Content and classes that override them.
Bug: T287158
Change-Id: Idfcfbfe1a196cd69a04ca357281d08bb3d097ce2
Use ContentTransformer::preSaveTransform instead.
Extensions defining a content model should override ContentHandler::preSaveTransform.
Bug: T287156
Change-Id: I2a8c60470366fd95d056e0dfa8144f209bb7117e
Update ContentTransformer to access ContentHandler::preLoadTransform through the service.
Prepare object to hold a data that required for ContentHandler::preLoadTranform params.
This is a fully backwards compatible change.
We are doing hard deprecation via MWDebug::detectDeprecatedOverride.
However, with the ContentHandler calling Content and
Content calling ContentHandler, it doesn't matter whether
callers use Content or ContentHandler. This will allow us
to naturally convert all callers.
Bug: T287157
Change-Id: I89537e1e7d24c6e15252b2b51890a0bd81ea3e6b
If an exctension ContentHandler overrides one of the
subclasses of the core ContentHandler, for example
TextContentHandler, when switching calls we no longer
call deprecated Content::preSaveTransform for the
extension Content model.
Bug: T288191
Change-Id: Ie7edc97be9098f3cd188949bd37943c37a0b65ff
Create ContentTransformer to access ContentHandler::preSaveTransform through the service.
Prepare object to hold a data that required for ContentHandler::preSaveTranform params.
This will require making a semi-backwards-incompatible
change no matter what, we don't really have a great way
of hard-deprecating overriding methods.
However, with the ContentHandler calling Content and
Content calling ContentHandler, and with the ProxyContent
trick to stop infinite recursion, it doesn't matter whether
callers use Content or ContentHandler. This will allow us
to naturally convert all callers. But won't really allow
hard-deprecation.
Bug: T287156
Change-Id: If6a2025868ceca3a3b6f11baec39695e47292e40
Updates for the removal of the Revision class itself
and the various methods/hooks/variables removed in the
process, including:
- Update some documentation removing most references
to the Revision class and updating the MCR migration
notes to reflect the past tense for Revision methods.
- Change some capitalization from "Revision" to "revision"
to make it clear comments are about revisions in general,
not the Revision class in particular.
- Minor code tweaks including removing unused variables that
were around for the old hooks that were removed, and
removing the use of DeprecatablePropertyArray where no
longer needed for anything.
- Fix incorrect documentation for PageUpdater::getStatus(),
the status value changed a while ago to have revision-record
in addition to revision, and recently to only have the
revision-record, but ironically PageUpdater was never updated.
- Removed Parser::$mRevisionObject, used to be a Revision object
and was deprecated in 1.35, missed earlier because it was no
longer being set to Revision objects, always null.
- Add RevisionRecord typehints in DummyLinker to match those
in the corresponding Linker methods
This should be a no-op in terms of functionality.
Bug: T247143
Change-Id: I03bbb94fc29085855448780b1a5ad9063911ecc4
ContentHandler::getForTitle() is deprecated since 1.35.
Depends-On: I52c40084d96e88b2edab46c15a10b83b7decf192
Change-Id: I9b3967a59714e231467a08e5a603f600ff1ab7c2
… including PHPDoc tags like `@return <type> $variableName`.
A return value doesn't have a variable name. I can see that
some people do this intentionally, repeating the variable
name that was used in the final `return $var;` at the end
of a method. This can indeed be helpful. I leave a lot of
these untouched and removed them only when it's obviously
wrong, or does not provide any additional information in
addition to what the code already says.
Change-Id: Ia18cd9f25ef658b08ad25b97a744897e2a8deffc
ContentHandler::getContentText() was introduced as a migration
helper and is mostly pointless now. Thus it should be deprecated
and later removed. This patch softs deprecates that method.
This patch also deprecates the corresponding setting
$wgContentHandlerTextFallback.
Bug: T268041
Change-Id: I7d477935a16316996c4f52a3d6466029745817b4
The following methods no longer support Revision parameters:
- CategoryMembershipChange::__construct
- ContentHandler::getUndoContent
- DerivedPageDataUpdater::prepareUpdate
- DifferenceEngine::getRevisionHeader
The following methods were removed entirely:
- Title::countAuthorsBetween
The following methods return arrays that formerly include
a 'revision' key that would emit deprecation warnings when
accessed and return a Revision object. The Revision object
has been removed from the arrays, and the 'revision-record'
key should be used to get the relevant RevisionRecord instead:
- PageUpdater::doModify
- PageUpdater::doCreate
- Parser::statelessFetchTemplate
The ParserOptions `templateCallback` option is a callback
that is called in Parser::fetchTemplateAndTitle() and should
return an array - the 'revision' key to that array used to
be a Revision object and was used if no 'revision-record'
was returned - it is now ignored.
Bug: T247143
Change-Id: I163ada88d649c75697aff4fa31a3a3c0bdef78b7
This reverts commit 5a0bfa9d98.
Reason for revert: caused a train blocker (T278429) plus Daniel says it's "super expensive"
Bug: T278429
Bug: T266067
Change-Id: I6724b4bc02d29c12c3fe18cc1e8fa17a443257d5
This introduces 3 new tags to track changes in media usage
across articles. These tags are both hidden & disabled by
default.
Bug: T266067
Change-Id: I3e7acafe0b2266cf6e253dfef42fa6c666424469
This method is useful when overriding getParserOutputForIndexing(), to
avoid the equivalent of T247859.
Note that the method is not stable to override, only to call.
Change-Id: Idd7e6ca6786f2c463737a47296b3da5f5e0e16f1
Require that getDataForSearchIndex() is only called with the result of
getParserOutputForIndexing(), and update the documentation of both
methods. Extensions may now override getParserOutputForIndexing() to
skip generating HTML; MediaWiki guarantees that the HTML itself is not
required by the base implementation of getDataForSearchIndex().
Note that for Wikitext content, many meta-data fields of ParserOutput –
links, sections, etc. – can only be obtained by actually parsing the
content and generating HTML, whether the caller asked for it or not.
However, this is not the case for all content models. This change allows
those content models to save some work when indexing their content,
while still working with the MediaWiki getDataForSearchIndex() method.
The new requirement on getDataForSearchIndex() is strictly speaking a
breaking change, but not one that could be marked as a deprecation
first. Hopefully, the release notes entry is enough.
Bug: T239931
Bug: T264283
Change-Id: I50f3a530f25fbcf019d36d09c070b11a46066c61
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: Ie32c1b11b3d16ddfc0c83a757327d449ff80b2e4
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: I5ffbb91882ecce2019ab644839eab5e8fb8a1c5f
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: If560596f5e1e0a3da91afc36e656e7c27f040968