mediawiki-extensions-Linter/tests/phpunit
daniel 8b22ad5d78 Trigger Parsoid run when page metadata is being updated
When RESTBase is turned off, Parsoid runs will no longer be triggered
on template changes. This creates a new mechanism to do that, based on
the RevisionDataUpdates hook called by DerivedPageDataUpdater. The new
behavior is controlled by a feature flag, LinterParseOnDerivedDataUpdate,
which is enabled per default. In WMF production, this should be
turned off as long as we are still triggering Parsoid parses through
the pregeneration mechanism in RESTBase.

Note that this will not write ParserOutput to the ParserCache. On edits,
pages will get parsed with Parsoid twice, once to trigger the lint data
update, and once by ParsoidCachePrewarmJob to populate the ParserCache.
Both parses will trigger the ParserLogLinterData hook, the lint data
from the second parse is redundant.

However, while ParsoidCachePrewarmJob and RevisionDataUpdates get
triggered together on edits, they also get triggered separately:
ParsoidCachePrewarmJob by page views with parser cache misses; and
RevisionDataUpdates when pages get invalidated due to template changes.

Because ParsoidCachePrewarmJob and RevisionDataUpdates generally get
triggered in different situations, it seems cleaner to keep the two
mechanisms independent of each other, and live with the duplicate parse
on edit.

Bug: T361013
Change-Id: If53841ee583ce240dd245d640b9ea9c97e1eaa55
2024-06-03 16:50:17 -05:00
..
unit Minor cleanup 2022-09-07 02:48:18 +01:00
CategoryMessagesTest.php [DI] Make CategoryManager and Database injectable services 2024-04-09 18:33:13 -04:00
DatabaseTest.php Drop DatabaseFactory, just have Database as the service 2024-04-10 21:21:40 -04:00
LintUpdateTest.php Trigger Parsoid run when page metadata is being updated 2024-06-03 16:50:17 -05:00
RecordLintJobTest.php Drop DatabaseFactory, just have Database as the service 2024-04-10 21:21:40 -04:00
ServiceWiringTest.php Construct services with ServiceOptions 2024-04-10 12:34:05 -04:00
SpecialLintErrorsTest.php Inject Database into TotalsLookup 2024-04-11 12:24:42 -04:00