Decoupling: Create Article factory
Risks:
- step1: low
- step2: low+
- step3: medium. Reason: too much code needs to be changed
Step1:
- Create ArticleFactory class
- deprecate static factory methods: Article::newFrom*
- cover by tests
- mark old factories as soft-deprecated
- register them to MediaWiki ServiceContainer
Step2:
- switch all calling from an old factory to a new factory
- use Page instead title where Page is part of the scope or IContext
Step3:
- Change all direct construction from "new Article()" to ArticleFactory
https://codesearch.wmflabs.org/deployed/?q=new%20Article%5C(&i=nope&files=%5C.php%24&repos=