Page MenuHomePhabricator

Remove fallback to global state in WikiImporter
Closed, ResolvedPublic

Description

Services should be injected into WikiImporter. There is a fallback provided in the constructor. All usages should start injecting the services into WikiImporter or start using the WikiImporterFactory service. The fallback to global state provided in the WikiImporter constructor should be hard-deprecated and eventually removed.

Event Timeline

Zabe changed the task status from Open to Stalled.May 24 2021, 7:05 PM

until dependency injection is introduced

@Zabe: Any idea which specific ticket this depends on? Or should this directly be tagged as Dependency injection ?

@Zabe: Any idea which specific ticket this depends on? Or should this directly be tagged as Dependency injection ?

This is a follow-up task to https://gerrit.wikimedia.org/r/c/mediawiki/core/+/691341, where dependency injection is added for the WikiImporter service. The patch isn't merged yet, thus I stalled this task.

Or should this directly be tagged as Dependency injection ?

Intuitively no, as this task isn't about the dependency injection itself, but rather about the removal of the fallback to global state. Maybe my task describtion doesn't make that clear.

Zabe changed the task status from Stalled to Open.May 26 2021, 4:58 PM

Change 695422 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/Wikibase@master] Using WikiImporterFactory service

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

Change 695422 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Using WikiImporterFactory service

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

Change 704111 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@master] Remove fallback to global state in WikiImporter

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

Change 704111 merged by jenkins-bot:

[mediawiki/core@master] Remove fallback to global state in WikiImporter

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

Zabe claimed this task.

Change 704497 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@master] Don't allow null values for services in WikiImporter

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

Change 704497 merged by jenkins-bot:

[mediawiki/core@master] Don't allow null values for services in WikiImporter

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