Now we are using Mustache, VectorTemplate has become a bit of redundant. There are many problems with the existing skin architecture, in particular the relationship between VectorTemplate and SkinVector
Among the problems:
* there is lots of indirection (and about 900 lines of code inherited),
* The naming! VectorTemplate extends BaseTemplate (which then extends QuickTemplate) and SkinVector extends SkinTemplate. VectorTemplate DOES NOT extends SkinTemplate !
* There is no longer a benefit to set and get when you are using Mustache
* BaseTemplate and QuickTemplate come with extra public APIs that the subclass (VectorTemplate) must not break. Notably, `/** @var array */ public $data;`, This makes many refactors dangerous and challenging.
I would like to move Vector away from VectorTemplate with some minimal changes in MediaWiki core.
Changes needed:
* Several functions in includes/skins/BaseTemplate.php would be moved to static functions so they can be used directly in SkinVector.
* SkinTemplate::setupTemplateForOutput currently does a lot of initialisation of private class variables. I'd like to move those to the constructor
* An html method will be pulled out and used by outputPage to allow a Skin to not use a BaseTemplate
* (Optional) a few helper classes will be added to SkinTemplate to refactor the very long prepareQuickTemplate function
A proof of concept is available for [[ https://gerrit.wikimedia.org/r/#/q/I39fe7a8bcb406f42b634ffa68cff5f99f5000478 | core ]] and [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/skins/Vector/+/592790/ | Vector ]]