Page MenuHomePhabricator

Refactor dependency injection (DI) in OutputTransform stages
Open, Needs TriagePublic

Description

OutputTransform stages should be using an ObjectFactory so that they can uniformly get access to any Service objects which they need.

Discussed in
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/966584/19..25/includes/OutputTransform/Stages/ParsoidLocalization.php

For inspiration take a look at SpecialPageFactory.php for how DefaultOutputPipelineFactory() could be setting up the pipeline using a list of object specifications and the ObjectFactory services, and the onSpecialPage_initList hook for how extensions would be able to extend the pipeline.