The function DoubleRedirectJob::fixRedirects needs some services
https://codesearch.wmcloud.org/search/?q=DoubleRedirectJob&i=nope&files=&repos=
| Umherirrender | |
| Oct 19 2020, 7:44 PM |
The function DoubleRedirectJob::fixRedirects needs some services
https://codesearch.wmcloud.org/search/?q=DoubleRedirectJob&i=nope&files=&repos=
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| DoubleRedirectJob: Inject appropriate service into job p.1 | mediawiki/core | master | +72 -20 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T259960 Inject services into API modules and special pages | |||
| Open | None | T265942 Research to create service for DoubleRedirectJob::fixRedirects |
Change 933899 had a related patch set uploaded (by D3r1ck01; author: Derick Alangi):
[mediawiki/core@master] DoubleRedirectJob: Inject appropriate service into job p.1
@Umherirrender, we have only 2 callers - https://codesearch.wmcloud.org/search/?q=DoubleRedirectJob%3A%3AfixRedirects&files=&excludeFiles=&repos=, I'm wondering if doing weak DI here is worth it? Since we always get a fresh instance from the global DI container and the method is static, should we still do this? Also, I've made a first parse to do a strong DI in the constructor for other methods within the class.
This task was created while injecting services into all special pages. Special:MovePage cannot give it's services to the DoubleRedirectJob as a static function is used. Maybe a service is to much, but it should be possible to inject services into that function and pass it to the job to avoid the global state.
Change 933899 merged by jenkins-bot:
[mediawiki/core@master] DoubleRedirectJob: Inject appropriate service into job p.1