Page MenuHomePhabricator

Refactor and split up CheckConstraints::newFromGlobalState
Closed, DeclinedPublic

Description

CheckConstraints::newFromGlobalState is not covered by any tests, so when one of the classes instantiated in there gains a constructor parameter, nothing besides manual testing reminds us to update the instantiation. It should be split up into several functions, most of which can be tested on their own. (newFromGlobalState should probably do nothing more except passing WikibaseRepo::getDefaultInstance() and MediaWikiServices::getInstance() into those functions.)

Event Timeline

Change 406050 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Split up and test CheckConstraints::newFromGlobalState

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

Change 406050 abandoned by Lucas Werkmeister (WMDE):
Split up and test CheckConstraints::newFromGlobalState

Reason:
no longer necessary – see especially T190933

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