Page MenuHomePhabricator

Inject services into API modules and special pages
Open, LowPublic

Description

Since T222388 it has been possible to inject services into API modules and special pages.

Some SpecialPages in core now do this: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/58b7003abb72d4c042164ad7e2262c6a8e4f0f9a/includes/specialpage/SpecialPageFactory.php#69

API modules in core don't seem to do it yet: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/58b7003abb72d4c042164ad7e2262c6a8e4f0f9a/includes/api/ApiMain.php#61

SpecialPage and ApiBase access the service container directly.

There are discussions happening in code reviews on individual patches about whether (or when) we should be injecting services in core API modules and special pages. It would be good to have some guidance so we can resolve these conversations consistently.

Details

ProjectBranchLines +/-Subject
mediawiki/coremaster+78 -30
mediawiki/coremaster+48 -14
mediawiki/coremaster+54 -17
mediawiki/coremaster+53 -14
mediawiki/coremaster+603 -157
mediawiki/coremaster+98 -31
mediawiki/coremaster+90 -39
mediawiki/coremaster+29 -10
mediawiki/coremaster+20 -3
mediawiki/coremaster+32 -18
mediawiki/coremaster+71 -19
mediawiki/coremaster+72 -16
mediawiki/coremaster+58 -42
mediawiki/coremaster+132 -31
mediawiki/coremaster+18 -6
mediawiki/coremaster+23 -5
mediawiki/coremaster+17 -5
mediawiki/coremaster+51 -21
mediawiki/coremaster+26 -12
mediawiki/coremaster+171 -44
mediawiki/coremaster+16 -7
mediawiki/coremaster+26 -7
mediawiki/coremaster+162 -34
mediawiki/coremaster+19 -4
mediawiki/coremaster+39 -14
mediawiki/coremaster+30 -5
mediawiki/coremaster+94 -29
mediawiki/coremaster+35 -12
mediawiki/coremaster+15 -6
mediawiki/coremaster+23 -3
mediawiki/coremaster+20 -13
mediawiki/coremaster+16 -5
mediawiki/coremaster+14 -3
mediawiki/coremaster+37 -6
mediawiki/coremaster+93 -25
mediawiki/coremaster+20 -5
mediawiki/coremaster+17 -8
mediawiki/coremaster+18 -4
mediawiki/coremaster+87 -32
mediawiki/coremaster+100 -25
mediawiki/coremaster+27 -6
mediawiki/coremaster+28 -7
mediawiki/coremaster+27 -7
mediawiki/coremaster+40 -12
mediawiki/coremaster+45 -18
mediawiki/coremaster+51 -27
mediawiki/coremaster+34 -8
mediawiki/coremaster+36 -12
mediawiki/coremaster+34 -9
mediawiki/coremaster+13 -8
mediawiki/coremaster+10 -6
mediawiki/coremaster+45 -12
mediawiki/coremaster+49 -8
mediawiki/coremaster+114 -43
mediawiki/coremaster+29 -26
mediawiki/coremaster+220 -41
mediawiki/coremaster+25 -9
mediawiki/coremaster+1 K -544
mediawiki/coremaster+25 -3
Show related patches Customize query in gerrit

Related Objects

StatusSubtypeAssignedTask
Opendaniel
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
Resolveddmaza
ResolvedMainframe98
OpenNone
OpenDannyS712
OpenDannyS712
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenDannyS712
OpenNone
OpenNone
OpenNone
OpenDannyS712
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 632249 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialWithoutInterwiki

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

Change 632227 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialMediaStatistics

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

Change 633327 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialUnwatchedPages

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

Change 633574 merged by jenkins-bot:
[mediawiki/core@master] Inject DBLoadBalancer into SpecialWantedpages

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

Change 633495 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Inject services into ApiValidatePassword

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

Change 632531 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialBrokenRedirects/SpecialDoubleRedirects

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

Change 633576 merged by jenkins-bot:
[mediawiki/core@master] Inject DBLoadBalancer into SpecialLinkSearch

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

DannyS712 moved this task from Unsorted to In progress on the User-DannyS712 board.

Change 633573 merged by jenkins-bot:
[mediawiki/core@master] Inject RepoGroup into SpecialWantedfiles

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

Change 633808 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject AuthManager into abstract AuthManagerSpecialPage

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

Change 633815 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialExpandTemplates

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

Change 633495 merged by jenkins-bot:
[mediawiki/core@master] Inject services into ApiValidatePassword

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

Change 633823 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject DBLoadBalancer into SpecialMIMESearch

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

Change 634257 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Inject UserFactory into SpecialConfirmEmail

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

Change 634258 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Inject UserFactory into SpecialEmailInvalidate

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

Change 634319 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject LinkBatchFactory into SpecialExpandTemplates

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

Change 634257 merged by jenkins-bot:
[mediawiki/core@master] Inject UserFactory into SpecialConfirmEmail

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

Change 634326 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject PermissionManager into SpecialTags

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

Change 634330 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject NamespaceInfo into SpecialStatistics

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

Change 634332 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject LinkBatchFactory into SpecialSpecialpages

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

Change 634332 merged by jenkins-bot:
[mediawiki/core@master] Inject SpecialPageFactory into SpecialSpecialpages

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

Change 634258 merged by jenkins-bot:
[mediawiki/core@master] Inject UserFactory into SpecialEmailInvalidate

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

Change 634326 merged by jenkins-bot:
[mediawiki/core@master] Inject PermissionManager into SpecialTags

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

Change 634330 merged by jenkins-bot:
[mediawiki/core@master] Inject NamespaceInfo into SpecialStatistics

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

Change 628485 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialCategories

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

Change 628438 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialNewFiles

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

Change 634548 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject UserNamePrefixSearch into SpecialEmailUser

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

Change 634553 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject UserNamePrefixSearch into SpecialUserrights

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

Change 634559 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject LinkBatchFactory into SpecialListRedirects

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

Change 634567 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialFileDuplicateSearch

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

Change 634570 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialRunJobs

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

Change 634548 merged by jenkins-bot:
[mediawiki/core@master] Inject UserNamePrefixSearch into SpecialEmailUser

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

Change 634647 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject PasswordFactory into SpecialBotPasswords

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

Change 634651 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialChangeContentModel

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

Change 634653 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialComparePages

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

Change 634655 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject DBLoadBalancer into SpecialPagesWithProp

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

Change 634567 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialFileDuplicateSearch

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

Change 628444 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialNewpages

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

Change 628484 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialListFiles

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

Change 634655 merged by jenkins-bot:
[mediawiki/core@master] Inject DBLoadBalancer into SpecialPagesWithProp

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

Change 634647 merged by jenkins-bot:
[mediawiki/core@master] Inject PasswordFactory into SpecialBotPasswords

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

Change 634570 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialRunJobs

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

Change 633815 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialExpandTemplates

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

Change 628481 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialListUsers/SpecialActiveUsers

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

Change 633823 merged by jenkins-bot:
[mediawiki/core@master] Inject DBLoadBalancer into SpecialMIMESearch

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

Change 634319 merged by jenkins-bot:
[mediawiki/core@master] Inject LinkBatchFactory into SpecialTrackingCategories

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

Change 634559 merged by jenkins-bot:
[mediawiki/core@master] Inject LinkBatchFactory into SpecialListRedirects

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

Change 634771 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialListGroupRights

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

Change 634773 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialPageLanguage

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

Change 634775 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialPreferences

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

Change 633333 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialUpload/SpecialUploadStash

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

Change 634782 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialUndelete

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

Change 634651 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialChangeContentModel

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

Change 628525 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialMergeHistory

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

Change 634823 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialLog

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

Change 634771 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialListGroupRights

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

Change 634782 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialUndelete

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

Change 634773 merged by jenkins-bot:
[mediawiki/core@master] Inject services into SpecialPageLanguage

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

Change 635064 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Inject services into SpecialMovepage

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