Page MenuHomePhabricator

Reduce duplicated service instantiations in WBQC
Closed, ResolvedPublic

Description

WikibaseQualityConstraints has a ConstraintReportFactory class that instantiates several services; however, for more recent services, we seem to have stopped using it, instead copying+pasting service instantiations in several places. I don’t think this was a conscious decision, and I don’t see a reason why it would have to be this way. Let’s move some more services into ConstraintReportFactory.

Related: T183373: Refactor and split up CheckConstraints::newFromGlobalState (I think that task can actually be declined – as far as I can tell there’s no reason why CheckConstraints can’t use ConstraintReportFactory.)

Patch-For-Review:

Event Timeline

Change 434703 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Rearrange ConstraintReportFactory members

https://gerrit.wikimedia.org/r/434703

Change 434704 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Use ConstraintReportFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/434704

Change 434705 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add ResultsSource and auxiliary services to ConstraintReportFactory

https://gerrit.wikimedia.org/r/434705

Change 434703 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Rearrange ConstraintReportFactory members

https://gerrit.wikimedia.org/r/434703

Change 434704 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Use ConstraintReportFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/434704

Change 434705 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add ResultsSource and auxiliary services to ConstraintReportFactory

https://gerrit.wikimedia.org/r/434705