Commit graph

1210 commits

Author SHA1 Message Date
jenkins-bot
f808e7dc4a Merge "WikiPage: Document triggerOpportunisticLinksUpdate and related code" 2021-05-05 22:41:05 +00:00
Timo Tijhof
481f1a49d6 WikiPage: Document triggerOpportunisticLinksUpdate and related code
== History of WikiPage::triggerOpportunisticLinksUpdate ==

* 2007 (r19095; T10575; b3a8d488a8)

  Introduces the "cascading protection" feature.

  This commit added code to Article.php, in a conditional branch
  where we encountered a ParserCache "miss" and thus have done a
  fresh parse. The code in question would query which templates
  we ended up using, and if that differed from what the database
  said (e.g. stored during the last actual edit or links update),
  then a new LinksUpdate is ad-hoc constructed and executed.

  I could not find it anywhere explicitly spelled out, but my best
  guess is that the reason for this is to make sure that if the page
  in question contains wikitext that trancludes a different page based
  on the current date and time (such as how most Wikipedia main pages
  transclude news information and "Did you know" information based on
  dated subpages that are prepared in advance), then we don't just
  want to re-render the page after a day has passed, we also want to
  re-do the links update to ensure the search index, category links,
  and "WhatLinksHere" is correct, and thus by extent, to make sure
  that cascading protection from the main page does in fact apply
  to the "current" set of subpages and templates actually in-use.

* 2007 (r19227; 0c0c0eff81)

  This adds an optimisation to the added logic that limits it to
  pages that satisfy `mTitle->areRestrictionsCascading()`.

  Thus for most articles, which aren't protected at all, we don't
  run LinksUpdate mid-request after a cache miss page view.

  Because of this commit, the pre-2007 status quo remained unaltered
  and has remains unaltered to this very day: We don't re-index
  categories and WhatLinksHere etc, unless an article edit or
  propagating template edit takes place.

* 2009 (r52888; 1353a8ba29)

  Introduces the PoolCounter feature.

  The logic in question moves to Article::doCascadeProtectionUpdates().

* 2015 (Iea952d4d2e66; df5ef8b5d7).

  The logic in question is changed, motivated by wanting to avoid
  DB writes during page views.

  * Instead of executing LinksUpdate mid-request, we now queue a
    RefreshLinksJob on the JobQueue, and utilize a newly added
    `prioritize => true` parameter.

  This commit also introduces a new feature, which is to queue
  RefreshLinksJob also for pages that do not have cascading
  protection, but that do satisfy a new boolean method
  called `$parserOutput->hasDynamicContent()`, which is set when
  the Parser encounters TTL-reducing magic words and functions
  such as {{CURRENTDAY}} and {{#time}}. For this new case, however,
  the `prioritize` parameter is not set, and this feature is disabled
  in WMF production (and other farms that enable wgMiserMode).

  This commit also renamed doCascadeProtectionUpdates()
  to triggerOpportunisticLinksUpdate().

  This commit also removed various documentation comments, which
  I've partly restored in this patch, the patch you're looking at
  now.

== Actual changes ==

* Rename hasDynamicContent() to hasReducedExpiry() and keep the
  previous method as a non-deprecated wrapper.

  This change is motivated by T280605, in which I intent to make use
  of a Parser hook that reduces the cache expiry. There are numerous
  extensions in WMF production that already do this, and thus the
  assumption that these have "dynamic content" is already false in
  some cases. I'm not yet sure how or if to refactor this so to allow
  reducing of the TTL *without* causing this side-effect, but as a
  first step we can make the method more obvious in its impact
  and behaviour.

  I've also updated two of the callers that I think will benefit from
  this more explicit name and (current) implementation detail.

Bug: T280605
Change-Id: I85bdff7f86911f8ea5b866e3639f08ddd3f3bf6f
2021-05-05 02:03:30 +01:00
DannyS712
f60ea069ba Remove remaining non-test uses of Revision objects
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
2021-05-04 13:10:22 -07:00
DannyS712
7bd7d2a6c1 Remove hooks that use Revision objects
All hooks were previously hard deprecated
in 1.35. Affected hooks:
* ArticleRevisionUndeleted - use RevisionUndeleted
* ArticleRollbackComplete - use RollbackComplete
* DiffRevisionTools - use DiffTools
* DiffViewHeader - use DifferenceEngineViewHeader
* HistoryRevisionTools - use HistoryTools
* NewRevisionFromEditComplete - use RevisionFromEditComplete
* PageContentInsertComplete - use PageSaveComplete
* PageContentSaveComplete - use PageSaveComplete
* ParserFetchTemplate - use BeforeParserFetchTemplateRevisionRecord
* RevisionInsertComplete - use RevisionRecordInserted
* TitleMoveComplete - use PageMoveComplete
* TitleMoveCompleting - use PageMoveCompleting
* UndeleteShowRevision - no replacement

Includes a fix for setting the associated rev id
of page protections, which previously was only done
using $nullRevision which was a Revision object created
if any hooks needed it; those hooks were hard deprecated
and so for WMF prod the rev id was not being set.

Bug: T247143
Depends-On: Idfa345193ae99fb2f1c9a8f8d28d8d540a6e3d62
Change-Id: I519167f76a5a3c1f5410415b2721462a3dcc3ec8
2021-04-30 17:28:20 +00:00
jenkins-bot
b92d5e0e0e Merge "Document methods that may return StubUserLang instead of Language" 2021-04-30 04:36:32 +00:00
Umherirrender
e69f56fc9b build: Remove unneeded phpcs:ignore on false positives
False positives are resolved with the current release

Change-Id: I21986ec808edb341bf56abae8ee4e34e1559bc49
2021-04-29 23:50:07 +02:00
jenkins-bot
acb29985a2 Merge "Parser: remove Title from method signatures" 2021-04-29 18:28:28 +00:00
daniel
4880a82555 Parser: remove Title from method signatures
Bug: T281068
Change-Id: I3280e38dd82d71845c343eeb911e71dd33bb380b
2021-04-29 18:11:46 +02:00
Petr Pchelko
61599cd74a Clean up hard-deprecated Parser methods returning Revision
Bug: T278376
Change-Id: Ia4b5ab71c1df20e07dbfa3465be022225e8b44c1
2021-04-26 13:59:53 -07:00
Ammarpad
ed6450374b Document methods that may return StubUserLang instead of Language
Typehinting parameters that take the return value of these methods
with Language is not safe as they may return global $wgLang which
may or may not be instance of Language.

Bug: T278429
Change-Id: Ia5a71e4c39124f4427bd816e6e19207bb371cc6b
2021-04-19 12:50:14 +00:00
Bartosz Dziewoński
89eaaac661 Parser: Trim trailing whitespace as the last step in pre-save transform
It was accidentally removed in 2016 in commit
85034abca5.

Bug: T279964
Change-Id: I1da4d67143b86e7f852be7ccf3f16ae7b4f99bc4
2021-04-14 20:53:49 +02:00
jenkins-bot
cba20b9981 Merge "When the parser fetches revision content, guard against empty slots" 2021-03-18 11:51:15 +00:00
Petr Pchelko
0f0a11f6dc Make Parser use UserIdentity instead of User
Change-Id: Idf8578e88af1fd4824f49417a200b16befdbca51
2021-03-17 13:51:52 -06:00
Tim Starling
e767ae1ecc When the parser fetches revision content, guard against empty slots
Bug: T276476
Change-Id: I014da3a333f8ee6ca623b98c415b8d9f9d1be084
2021-03-17 12:18:10 +11:00
C. Scott Ananian
6844f3f158 Make Parser::$mPreprocessor private
This property was deprecated in 1.35.  The replacement function
Parser::getPreprocessor() was introduced in MediaWiki 1.12.0
(commit 8404b249ad).

Code search:
https://codesearch.wmcloud.org/search/?q=mPreprocessor&i=nope&files=&excludeFiles=&repos=

Bug: T275160
Change-Id: Ie5368fce94b5a239a91552bc7a145d9bdfaf47e5
Depends-On: I0917290d4ade8675b2d0eac17a22682c9c1b4a85
2021-03-16 22:38:01 +00:00
C. Scott Ananian
4497f99796 Parser: initialize preprocessor in constructor
Initializing the preprocessor in the constructor allows better
dependency injection, and removes code complexity caused by
lazy initialization.  Any use of the parser is going to end
up creating the preprocessor in any case, so deferring the
initialization doesn't save any performance.  (Best performance
is given by not creating the Parser in the first place if it
is not needed, which is what DI allows.)

Old code tried to unbreak cyclic dependencies by setting the
preprocessor to null.  This is somewhat of a lost cause,
since there are a number of other cyclic dependencies
involving the parser, including StripState, LinkHolders,
etc.  The code complexity is not worth it, given how
ineffective it is in any case.

This is part of T275160 in so far as it allows
Parser::getPreprocessor() to be a simple getter, and thus
(once this patch is merged) we can safely replace any
direct access to Parser::$mPreprocessor with a call to
Parser::getPreprocessor().

Bug: T275160
Change-Id: I38c6fe7d5a97badffdbf34d8b9d725756ed86514
2021-03-16 22:37:40 +00:00
C. Scott Ananian
e95b42eda6 Make Parser::$mOutput private
This property was deprecated in 1.35.  The replacement function
Parser::getOutput() was introduced in MediaWiki 1.12.2
(commit 350b498b9f).

Code search:
https://codesearch.wmcloud.org/search/?q=ser-%3EmOutput&i=nope&files=&excludeFiles=&repos=

Depends-On clauses below are for WMF-deployed code.  Other uses in
non-WMF-deployed code have been patched in:
* I550b19f58520f30ce158dab1969108edc9cdcce9 (SemanticDrilldown)
* https://github.com/SemanticMediaWiki/SemanticFormsSelect/pull/81
* Ic2798b0df5f1f11aea6becdfc186f1be0ecb43e4 (ApprovedRevs)
* I58dff3fc17292d9f6b5e1e43b3d18485027ec880 (DisplayTitle)
* Idd9736dacf257788d74e503687b8554e138ec3c5 (JsonData)
* Ia42f9fa0c45abe6eef21c9815f3f6d6794e3cf95 (MediaFunctions)
* I4f4f7b0118470741a6cdaba562f858e425fcf350 (ParserFunctions)
* Ie44573d9952e62e1fe75e2b9f4691e0d757c53c1 (PhpTags)
* Ib59a4789cfeebf1acbc24c5c00fb996413ae9d5c (SmoothGallery)
* I2b6f3be928a4cb101836ded7abaf2eb8665d4d50 (TinyMCE)
* https://gitlab.com/hydrawiki/extensions/DynamicPageList/-/merge_requests/118
* https://gitlab.com/nonsensopedia/extensions/advancedbacklinks/-/merge_requests/91
* https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/4935

Bug: T275160
Depends-On: I4f4f7b0118470741a6cdaba562f858e425fcf350
Change-Id: Ib5e9e22db1781ba338dc63ec479ef587de2cd675
2021-03-16 22:37:08 +00:00
C. Scott Ananian
77c48b6857 Remove Parser::$mConf
This was deprecated in 1.34 and then made private; no one uses it any more.

Code search:
https://codesearch.wmcloud.org/search/?q=-%3EmConf&i=nope&files=&excludeFiles=&repos=

Bug: T275160
Change-Id: I4f054328dcc20091030c130ddbcb5fac1eeeac82
2021-03-16 19:43:22 +00:00
C. Scott Ananian
ff20e86a4c Make Parser::$mFunctionHooks private
This property was deprecated in 1.35.

Code search:
https://codesearch.wmcloud.org/search/?q=mFunctionHooks&i=nope&files=&excludeFiles=&repos=

No dependencies in WMF-deployed code.  One use in non-WMF-deployed code:
* I5ae19465561b150ee1c74a1fe03fa359964e81c4

Bug: T275160
Change-Id: I96ca88048c5a1cc8032ebcd502015819958680fb
2021-03-16 19:42:25 +00:00
C. Scott Ananian
1c6e24a1a2 Make Parser::$mTagHooks private
This property was deprecated in 1.35.

Code search:
https://codesearch.wmcloud.org/search/?q=mTagHooks&i=nope&files=&excludeFiles=&repos=

Dependencies below are for WMF-deployed code.  Other uses in
non-WMF-deployed code have been patched in:
* I435b0d1ccae9d9bf6fff85dc3e79d3c4b447eb37
* I85ef0e6ce3f0c818df85809d39259d13b56d966c
* Idab6c9475f78ff4040061f2f317560bbe41666d8

Bug: T275160
Depends-On: Ic5445471d770e396421a4fb2bcfbe1490a77e1bf
Depends-On: Ib708e3f84aa871de84aa56561c875f4a85bb000c
Change-Id: I42e23b101e870b66d169cbb731a0359e90f46265
2021-03-16 19:42:12 +00:00
C. Scott Ananian
3f990d5b4c Inline Parser::firstCallInit() into ::__construct()
This has effectively been the case since 1.35; this just cleans up the
remaining code which assumed it still needed to explicitly call
Parser::firstCallInit() on a newly-constructed Parser.

Bug: T250444
Change-Id: I340947c721172f12ff413322b4283627c0b0b3a4
2021-03-16 19:41:56 +00:00
C. Scott Ananian
115410f077 Parser::__construct(): Remove deprecated argument variants
A number of different argument variants were deprecated in 1.34,
and direct calls to the Parser constructor were deprecated at the
same time (a ParserFactory should be used instead).  These were
hard-deprecated in 1.35.  They should be safe to remove now.

Code search:
https://codesearch.wmcloud.org/deployed/?q=new%20Parser%5C%28&i=nope&files=%5C.php%24&excludeFiles=&repos=

Bug: T236811
Change-Id: I58f7b3ba1b1d62851b2db71197a8d9129e8d473d
2021-03-16 19:41:45 +00:00
jenkins-bot
f6e4f7280b Merge "Introduce Tidy service" 2021-03-16 19:29:17 +00:00
jenkins-bot
1b8fb385a0 Merge "Parser: Move Sanitizer::normalizeCharReferences into RemexCompatFormatter" 2021-03-16 19:09:28 +00:00
C. Scott Ananian
1fd4a7af4e Introduce Tidy service
Refactor the old MWTidy singleton as a DI service.

Change-Id: I95605ea5fd22f53a7f90fe07a6a73fa6c959597a
2021-03-15 17:22:36 -04:00
C. Scott Ananian
5d317c25be Parser: Move Sanitizer::normalizeCharReferences into RemexCompatFormatter
Choosing a particular encoding of HTML entities is logically a task
of the Remex formatter (which serializes HTML).  Move it out of the
Parser so that it is part of the serialization specification.

This is a follow up to Ic8965e81882d7cf024bdced437f684064a30ac86.

Change-Id: If45907baf24d60987b39cd1f7709c5f7caf19f37
2021-03-15 17:20:14 -04:00
DannyS712
527c2cdbb9 Minor readability tweaks in Parser.php
- When assigning multiple variables, use multiple statements
- Separate function calls with multiple variables over multiple
lines to make them easier to follow
- Reduce indentation via an early `continue` statement

Should be a no-op

Change-Id: Ib1d625a356cd914db2da29f8178a0568eb6e2aba
2021-03-03 14:03:58 +00:00
Arlo Breault
c44a3958a3 Don't apply French spacing in raw text elements
This also means we don't need to take special care for French spacing in
attributes, since it's no longer applied there.

Adds a test that captures this change.

Note that the test "Nowiki and french spacing" wonders whether this
escaping should be applied to nowiki content.

Bug: T255007
Change-Id: Ic8965e81882d7cf024bdced437f684064a30ac86
2021-02-16 19:26:29 -05:00
jenkins-bot
183d83b572 Merge "parser: new BeforeParserFetchTemplateRevisionRecord hook" 2021-02-16 04:31:16 +00:00
Umherirrender
8de3b7d324 Use static closures where safe to use
This is micro-optimization of closure code to avoid binding the closure
to $this where it is not needed.

Created by I25a17fb22b6b669e817317a0f45051ae9c608208

Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
2021-02-11 00:13:52 +00:00
C. Scott Ananian
0676256ccc parser: new BeforeParserFetchTemplateRevisionRecord hook
This new hook provides for the use case in T47096 (allowing the
Translate extension to transclude a page from another language) by
adding a new hook which would let us deprecate and replace two awkward
legacy hooks (one with an embarrassing capitalization issue).  The new
hook is a little more tightly scoped in terms of what it allows and
gives access to, and it uses the new RevisionRecord API.

In addition, the new hook uses LinkTarget instead of Title per
current best practices. (PageIdentity is not appropriate for
reasons documented at the hook invocation site.)

The original BeforeParserFetchTemplateAndtitle (sic) hook allowed
redirecting the revision id of a template inclusion, but not the
title. The only known current use is Extension:ApprovedRevs; the
FlaggedRevs extension replaces the entire function using
ParserOptions::setCurrentRevisionRecordCallback().

Extension:Translate would like to redirect the title as well, possibly
recursively (for a limited number of hops) to handle fallback
languages.  That is, when invoked on Foo/fr, including Template:Bar
would redirect to Template:Bar/fr -- and, if that doesn't exist, then
Template:Bar/fr would redirect to its fallback language, say
Template:Bar/en. It uses the top-level page title as context to set
the desired page language.  This would require 2 invocations of the
hook; we've set the recursion limit to 3 to provide a little bit
of future-proofing.

The hook added in this patch uses RevisionRecord instead of int
$rev_id, and thus can handle the case where the redirect is to a page
which doesn't exist (by setting the RevisionRecord to a
MutableRevisionRecord with the correct title and no main slot content)
in the fallback language case above.

The new hook deprecates BeforeParserFetchTemplateAndtitle and replaces
ParserFetchTemplate as well (deprecated in 1.35).  Code search:

https://codesearch.wmcloud.org/search/?q=BeforeParserFetchTemplateAndtitle&i=nope&files=&repos=

Bug: T47096
Change-Id: Ia5b5d339706ce4084c16948300e0e3418b11792e
2021-02-05 09:37:32 -05:00
jenkins-bot
607c4d3910 Merge "CacheTime: remove mVersion field" 2021-01-25 19:12:05 +00:00
jenkins-bot
e845067ab6 Merge "Adopt pipe trick with Arabic comma" 2021-01-16 03:29:36 +00:00
Niklas Laxström
8d42b76017 Fix @deprecated for Parser::enableOOUI
Change-Id: I0d6937a82413f50a054ba0e3869efa3863a6632b
2021-01-13 15:12:50 +01:00
jenkins-bot
7200e36c9f Merge "parser: convert Preprocessor to WANCache and inject dependencies" 2021-01-12 05:04:47 +00:00
Aaron Schulz
de6eeead21 parser: convert Preprocessor to WANCache and inject dependencies
Make the caching logic use getWithSetCallback() and simplify
the code given that there is only one Preprocessor subclass.
Also, keep the cached values JSON serializable but rely on
the serialization in BagOStuff instead for simplicity.

Add related class constants for injecting preprocessor flags.

Bug: T254608
Change-Id: I72f9f0c0bc352ed5120469090c71294ff0c24999
2021-01-11 20:21:10 -08:00
Ebrahim Byagowi
9fe1d1f734 Adopt pipe trick with Arabic comma
Currently MediaWiki turns `[[test, abc]]` to `[[test, abc|test]]`
while saving the page but that comma isn't in use in Persian
so this patch makes MediaWiki to treat Arabic comma the same way
as regular comma.

Change-Id: Ib8051023abc25b7c4f97a3f50246f35650057ec9
2021-01-11 21:43:33 +00:00
C. Scott Ananian
a41f284324 CoreTagHooks: First argument passed to parser tags can be null
Document and enforce the correct type for the first argument to
a Parser tag hook, which will be `null` if the tag is self-closed.

Mark the methods in CoreTagHooks @internal.  They are apparently
unused outside MediaWiki core:
  https://codesearch.wmcloud.org/search/?q=CoreTagHooks&i=nope&files=&repos=

Add coverage test cases to ensure that all tag hooks properly handle
the `null` value of the first argument; prior to this patch the
`<html>` tag emitted a broken strip tag in this case.  The other hooks
passed the null to other callees in violation of their type
signatures, but eventually every other hook managed to safely cast the
null to the empty string without throwing an exception or emitting a
warning.  For those, this patch does not change existing behavior---it
just makes the cast to the empty string much more obvious to the
reader.

Change-Id: I69fde6c06eabb2db27bb1cc23d2cb19b99273391
2021-01-05 14:19:44 -05:00
Petr Pchelko
2010a912c2 CacheTime: remove mVersion field
Has to be merged at least one train after the parent patch.

Bug: T269393
Change-Id: Iee98950ad0452a50088e755252da8468f0bec1ae
2021-01-04 10:29:52 -06:00
Umherirrender
a30fe542ae build: Enable SecurityCheck-DoubleEscaped and suppress issues
This issue type was globally suppressed in
I849ac4f120fd15b483e8939d4db45c98dc351259 to make reviewer easier.

This adds inline suppressions or @suppress directives on function
docs for false positives, mostly restoring those removed in
I849ac4f120fd15b483e8939d4db45c98dc351259

Bug: T231311
Change-Id: I1b1d814bd907e9d49fcc39f777982936574fc7c6
2020-12-30 23:34:20 +00:00
Umherirrender
e9e784a09e build: Enable phan-taint-check-plugin and suppress issues
Taint check checks for possible security issues by tracking html
escaping and more by using phan.
This slows done the phan-job a bit and requires more ram

Keep the DoubleEscaped issues out to make reviewer easier

Adds suppression for false positives
Adds taint-annotation to help taint-check
Removes suppression for code phan now understand better by the tracking
of keys in taint-check
Fix some small issues by adding int cast or htmlspecialchars calls

Bug: T216348
Bug: T268920
Change-Id: I849ac4f120fd15b483e8939d4db45c98dc351259
2020-12-30 19:02:22 +01:00
DannyS712
25db391d53 ParserOptions: Deprecate fallback to $wgUser
Emit deprecation notices in the constructor
if falling back to $wgUser, and fix core
calls

Bug: T246861
Depends-On: I51117931d527a3bdda468b48de577a7faafbcd69
Change-Id: Ibd0a8ffd0494c17a378cc43e6b6164166130adf4
2020-12-16 09:03:29 +00:00
Petr Pchelko
7978bfab37 Parser: use setter instead of accessing ParserOutput property
Bug: T269236
Change-Id: I195160d24a5d5bf4eb4cb0890c39c6720e8ec3ac
2020-12-02 08:57:39 -06:00
Umherirrender
201980999a build: Updating mediawiki/mediawiki-phan-config to 0.10.4
Change-Id: I56538eaa498ab6d312240f9a534c2d2da11c34cb
2020-11-20 17:33:22 +01:00
Thiemo Kreuz
1fc8d79ac6 Remove documentation that literally repeats the code
For example, documenting the method getUser() with "get the User
object" does not add any information that's not already there.
But I have to read the text first to understand that it doesn't
document anything that's not already obvious from the code.

Some of this is from a time when we had a PHPCS sniff that was
complaining when a line like `@param User $user` doesn't end
with some descriptive text. Some users started adding text like
`@param User $user The User` back then. Let's please remove
this.

Change-Id: I0ea8d051bc732466c73940de9259f87ffb86ce7a
2020-10-27 19:20:26 +00:00
Ppchelko
3254e41a4c Revert "Revert "Revert "Hard deprecate all public properties in CacheTime and ParserOutput"""
This reverts commit deacee9088.

Bug: T264257
Change-Id: Ie68d8081a42e7d8103e287b6d6857a30dc522f75
2020-10-01 12:03:41 -06:00
Ppchelko
deacee9088 Revert "Revert "Hard deprecate all public properties in CacheTime and ParserOutput""
This reverts commit a4dc6d82af.

I've reverted the merged patch since I didn't do enough testing
on serialized/reserialized ParserOutput and CacheTime. Now I'm
confident serialization/deserialization works.

Changes since original reverted version:
 - Use __get/__set instead of DeprecationHelper in order to
   avoid $deprecateProperties array to be serialized.
 - Add test for old format serialization new format deserialization.

Change-Id: Ic911c2724ad709931d3316e609781fb89b5b7b28
2020-09-24 07:55:18 -07:00
Ppchelko
a4dc6d82af Revert "Hard deprecate all public properties in CacheTime and ParserOutput"
This reverts commit 799c10b7eb.

Reason for revert: Didn't test how this would work with deserializing stored ParserOutput.

Change-Id: I4221bc26282f3b4bd044f0ab50d00e77eb57ede0
2020-09-23 22:46:33 +00:00
Petr Pchelko
799c10b7eb Hard deprecate all public properties in CacheTime and ParserOutput
* In preparation for ParserCache/Parsoid integration, it's nice to
  do some cleanups. Will untie our hands a bit more.
* Verified no usages in extensions deployed at wikimedia, other then
  Flow, fixed in the dependent patch.

Change-Id: Idd78413a36887e2ff5c902d410e55691cafb736b
2020-09-23 07:17:13 -07:00
C. Scott Ananian
aae8b558c3 Remove ParserBeforeStrip/ParserAfterStrip hooks, deprecated in 1.35
Everything code search:
https://codesearch.wmflabs.org/search/?q=ParserBeforeStrip%7CParserAfterStrip&i=nope&files=&repos=

Bug: T250449
Bug: T250450
Change-Id: I91e6753a9159bb7f8d699c79fd20483c42be33aa
2020-09-20 14:12:18 +01:00