Commit graph

6 commits

Author SHA1 Message Date
daniel
f31cd9f1d3 REST: HtmlInputTransformHelper: Load original data from stash
Parsoid needs the original rendering in order to apply
selective serialization (selser). The page/{title}/html endpoint
can stash the rendering, and now the transform endpoint can make use
of the stashed rendering.

Bug: T310464
Change-Id: Ia58043ed3aa1eb12731d82aa87606c82ec63f663
2022-09-29 19:52:27 +02:00
daniel
24a26ec25b REST: make ParsoidHandler use HTMLTransformFactory
This also moves the creation of PageConfig from HTMLTransformFactory
into HTMLTransform, to ensure all relevant info, particularly the
page language, is known.

Change-Id: Id354862d6497816e0c007b9cb3b0d183c9d4b719
2022-09-16 18:46:17 +02:00
Máté Szabó
36dd10f9de Migrate use of ${var}-style string interpolation
The "${var}" and "${expr}" style string interpolations are deprecated in
PHP 8.2. Migrate usages in core to "{$var}" as appropriate.

Bug: T314096
Change-Id: I269bad3d4a68c2b251b3e71a066289d4ad9fd496
2022-07-29 02:45:09 +02:00
Derick Alangi
c1c5f3f7f3 Rest: Make transformation endpoints configurable
Page bundles should not be part of the publicly accessible
API and if we really need it, we can expose it and consume
internally. Hence, remove support for this transform from the
endpoint.

This patch falls back to the behavior before for backwards
compatibility before we fully switch over to using the transforms
in core. We still need to support both core & restbase for now.

NOTE: API integration tests have been updated to status code
404 since we're removing support for it now. If we need it,
we'll expose via a different endpoint and introduce tests.

Bug: T311477
Change-Id: I5577f61f7ae7da2a4d3a78d9ce962997466d550c
2022-06-30 13:28:57 +01:00
Derick Alangi
b0d08dcbfc Rest: Remove {domain} param from TransformHandler
RESTBase used this to check if the domain sent by the client
matches the domain in the restbase config under the hood. Since
this code is moving to core, this assertion is no longer needed.

Bug: T301370
Change-Id: I01a4f35b81c31d106671e5c829d317a41687fd7a
2022-06-02 19:37:51 +01:00
Derick Alangi
80ce1fe28f Rest: Move TransformHandler to core (part 1)
Begin moving the transform endpoints and handler class to
MediaWiki core.

Bug: T301370
Change-Id: I94e9d2e8d497c1992c542001afe333fa7537e553
2022-06-02 15:55:06 +01:00