Avoid extra parse/save delay for users with non-canonical parser options
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 26 Oct 2018 22:42:26 +0000 (15:42 -0700)
committerKrinkle <krinklemail@gmail.com>
Sun, 14 Apr 2019 02:00:16 +0000 (02:00 +0000)
commitfdbb64f3546e6fda0ee0ce003467b4cfb13a090f
tree7678eb02d84315e9c8627812653dd23ade379ebc
parent6f4d15e38580720d8e4915194834d80d873bd58b
Avoid extra parse/save delay for users with non-canonical parser options

If {{REVISIONID}} results in a re-parse, that re-parse will be post-send
unless the user has canonical parser options and will need the output for
page views anyway (e.g. the refresh after editing).

Also make getPreparedEdit() allow lazy-loading of the parser output via
a callback. A magic __get() method handles objects created the new way
but accessed by other code the old way.

Bug: T216306
Change-Id: I2012437c45dd605a6c0868dea47cf43dc67061d8
includes/Storage/DerivedPageDataUpdater.php
includes/edit/PreparedEdit.php
includes/parser/ParserOptions.php
tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
tests/phpunit/includes/Storage/PreparedEditTest.php [new file with mode: 0644]
tests/phpunit/includes/parser/ParserOptionsTest.php