Remove use of deprecated HtmlOutputRendererHelper::init() method

Depends-On: I1e1213597c6be012f2bc024c2b370c968ff3b472
Change-Id: Id63d93db801d0bfb3fdb4c69bf7dfeea4e68ea8f
This commit is contained in:
C. Scott Ananian 2024-06-05 12:22:11 -04:00
parent 3bc0b9b1b8
commit 443e67c5c1

View file

@ -52,8 +52,6 @@ class DirectParsoidClient implements ParsoidClient {
bool $stash = false, bool $stash = false,
string $flavor = self::FLAVOR_DEFAULT string $flavor = self::FLAVOR_DEFAULT
): HtmlOutputRendererHelper { ): HtmlOutputRendererHelper {
$helper = $this->helperFactory->newHtmlOutputRendererHelper();
// TODO: remove this once we no longer need a User object for rate limiting (T310476). // TODO: remove this once we no longer need a User object for rate limiting (T310476).
if ( $this->performer instanceof User ) { if ( $this->performer instanceof User ) {
$user = $this->performer; $user = $this->performer;
@ -61,7 +59,7 @@ class DirectParsoidClient implements ParsoidClient {
$user = User::newFromIdentity( $this->performer->getUser() ); $user = User::newFromIdentity( $this->performer->getUser() );
} }
$helper->init( $page, [], $user, $revision ); $helper = $this->helperFactory->newHtmlOutputRendererHelper( $page, [], $user, $revision );
// Ensure we get a compatible version, not just the default // Ensure we get a compatible version, not just the default
$helper->setOutputProfileVersion( self::PARSOID_VERSION ); $helper->setOutputProfileVersion( self::PARSOID_VERSION );