Commit graph

5 commits

Author SHA1 Message Date
Tim Starling
5e30a927bc tests: Make some PHPUnit data providers static
Just methods where adding "static" to the declaration was enough, I
didn't do anything with providers that used $this.

Initially by search and replace. There were many mistakes which I
found mostly by running the PHPStorm inspection which searches for
$this usage in a static method. Later I used the PHPStorm "make static"
action which avoids the more obvious mistakes.

Bug: T332865
Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
2023-03-24 02:53:57 +00:00
Subramanya Sastry
071d368495 Revert "Revert "TransformHandler: Load stashed page bundle based on ETag.""
This reverts commit c4f40bd107.

Change-Id: Iff0f9859a83506059f100ddd60b74cfdd1279071
2023-03-10 13:44:46 -06:00
Subramanya Sastry
c4f40bd107 Revert "TransformHandler: Load stashed page bundle based on ETag."
This reverts commit ee8dd055c8.

Reason for revert: breaks officewiki

Bug: T331629
Depends-On: I46f16eae9c137d43aad22bfd4be460cfb635614b
Change-Id: Ieb0dedfb5ae3168749a9ab6d930be527337348e8
2023-03-09 15:36:54 +00:00
daniel
ee8dd055c8 TransformHandler: Load stashed page bundle based on ETag.
Allow clients to use an If-Match header with the
transform/html/to/wikitext endpoint.

Bug: T310464
Needed-By: Ifb1c40a0044f04fb339b00630fbca9190a1bce51
Change-Id: Ida81a314f015e205f2081c68a82d486145097c92
2023-01-24 20:26:05 +01:00
Derick Alangi
13f6ec9e1b Rest: Migrate parsoid stashing logic from RESTbase
Add stash option to /page/html & /revision/html endpoints.
When this option is set, the PageBundle returned by Parsoid is
stashed and an etag is returned that can later be used to
make use of the stashed PageBundle.

The stash is for now backed by the BagOStuff returned by
ObjectCache::getLocalClusterInstance().

This patch adds additional data to the ParserOutput stored in ParserCache.
Old entries lacking that data will be ignored.

Bug: T267990
Co-Authored-by: Nikki <nnikkhoui@wikimedia.org>
Change-Id: Id35f1423a69e3ff63e4f9883b3f7e3f9521d81d5
2022-05-23 17:28:29 +01:00