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+33 -36
mediawiki/coremaster+40 -16
mediawiki/coremaster+118 -39
mediawiki/coremaster+40 -7
mediawiki/coremaster+166 -33
mediawiki/coremaster+277 -62
mediawiki/coremaster+24 -18
mediawiki/coremaster+23 -5
mediawiki/coremaster+10 -9
mediawiki/coremaster+94 -20
mediawiki/coremaster+75 -20
mediawiki/coremaster+13 -4
mediawiki/coremaster+55 -11
mediawiki/coremaster+27 -8
mediawiki/coremaster+25 -6
mediawiki/coremaster+28 -8
mediawiki/coremaster+45 -14
mediawiki/coremaster+136 -65
mediawiki/coremaster+29 -9
mediawiki/coremaster+33 -5
mediawiki/coremaster+10 -4
mediawiki/coremaster+50 -10
mediawiki/coremaster+13 -4
mediawiki/coremaster+26 -10
mediawiki/coremaster+25 -8
mediawiki/coremaster+24 -6
mediawiki/coremaster+20 -9
mediawiki/coremaster+42 -14
mediawiki/coremaster+81 -29
mediawiki/coremaster+26 -4
mediawiki/coremaster+24 -8
mediawiki/coremaster+36 -6
mediawiki/coremaster+33 -7
mediawiki/coremaster+9 -5
mediawiki/coremaster+25 -4
mediawiki/coremaster+30 -16
mediawiki/coremaster+28 -8
mediawiki/coremaster+24 -3
mediawiki/coremaster+24 -4
mediawiki/coremaster+24 -5
mediawiki/coremaster+83 -13
mediawiki/coremaster+37 -10
mediawiki/coremaster+25 -5
mediawiki/coremaster+171 -74
mediawiki/coremaster+129 -38
mediawiki/extensions/AbuseFiltermaster+116 -22
mediawiki/coremaster+34 -9
mediawiki/extensions/AbuseFiltermaster+150 -27
mediawiki/extensions/TwoColConflictmaster+28 -9
mediawiki/extensions/TemplateSandboxmaster+39 -14
mediawiki/extensions/CiteThisPagemaster+41 -22
mediawiki/extensions/FeaturedFeedsmaster+19 -4
mediawiki/extensions/CategoryTreemaster+17 -5
mediawiki/extensions/Disambiguatormaster+58 -12
mediawiki/coremaster+25 -3
mediawiki/coremaster+182 -21
mediawiki/extensions/MultiUploadmaster+3 -2
mediawiki/coremaster+73 -17
mediawiki/coremaster+163 -28
mediawiki/coremaster+77 -27
mediawiki/coremaster+105 -23
mediawiki/coremaster+7 -0
mediawiki/coremaster+122 -55
mediawiki/coremaster+51 -21
mediawiki/coremaster+610 -158
mediawiki/extensions/QuizGamemaster+7 -4
mediawiki/extensions/GlobalPreferencesmaster+2 -2
mediawiki/extensions/SocialProfilemaster+6 -1
mediawiki/extensions/FanBoxesmaster+6 -1
mediawiki/extensions/PictureGamemaster+6 -1
mediawiki/extensions/PollNYmaster+6 -1
mediawiki/extensions/GlobalContribsmaster+4 -2
mediawiki/extensions/GlobalUserrightsmaster+2 -1
mediawiki/extensions/CentralAuthmaster+2 -1
mediawiki/coremaster+58 -42
mediawiki/coremaster+20 -50
mediawiki/coremaster+48 -14
mediawiki/coremaster+51 -21
mediawiki/extensions/ORESmaster+7 -3
mediawiki/coremaster+35 -44
mediawiki/coremaster+111 -29
mediawiki/coremaster+110 -35
mediawiki/coremaster+74 -15
mediawiki/coremaster+100 -31
mediawiki/coremaster+88 -19
mediawiki/coremaster+35 -41
mediawiki/coremaster+90 -33
mediawiki/coremaster+266 -35
mediawiki/coremaster+165 -33
mediawiki/coremaster+151 -78
mediawiki/coremaster+56 -72
mediawiki/coremaster+58 -14
mediawiki/coremaster+61 -22
mediawiki/coremaster+27 -6
mediawiki/coremaster+39 -11
mediawiki/coremaster+54 -17
mediawiki/coremaster+26 -6
mediawiki/coremaster+40 -12
mediawiki/coremaster+35 -9
mediawiki/coremaster+107 -25
mediawiki/coremaster+20 -3
mediawiki/coremaster+43 -20
mediawiki/coremaster+16 -5
mediawiki/coremaster+56 -12
mediawiki/coremaster+18 -4
mediawiki/coremaster+53 -14
mediawiki/coremaster+90 -39
mediawiki/coremaster+29 -10
mediawiki/coremaster+32 -18
mediawiki/coremaster+71 -19
mediawiki/coremaster+132 -31
mediawiki/coremaster+18 -6
mediawiki/coremaster+23 -5
mediawiki/coremaster+17 -5
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+20 -5
mediawiki/coremaster+17 -8
mediawiki/coremaster+18 -4
mediawiki/coremaster+87 -32
mediawiki/coremaster+27 -6
mediawiki/coremaster+28 -7
mediawiki/coremaster+27 -7
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
Show related patches Customize query in gerrit

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedNone
Resolveddmaza
ResolvedMainframe98
OpenZabe
ResolvedDannyS712
Resolvedcscott
OpenNone
OpenNone
OpenNone
OpenDannyS712
OpenNone
OpenDannyS712
OpenNone
OpenDannyS712
ResolvedPchelolo
OpenDannyS712
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedVlad.shapik
ResolvedCCicalese_WMF
ResolvedVlad.shapik
ResolvedNikerabbit
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedUmherirrender
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone

Event Timeline

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

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

[mediawiki/core@master] ApiHelp: inject services

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

Change 701668 merged by jenkins-bot:

[mediawiki/core@master] ApiHelp: inject SkinFactory

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

Change 701955 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Inject services into ApiComparePages

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

Change 701976 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryPageProps

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

Change 701955 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiComparePages

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

Change 701976 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryPageProps

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

Change 702188 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiMergeHistory

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

Change 702190 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject RepoGroup into ApiMove

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

Change 702188 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiMergeHistory

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

Change 702190 merged by jenkins-bot:

[mediawiki/core@master] api: Inject RepoGroup into ApiMove

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

Change 702203 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiImageRotate

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

Change 702228 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiOpenSearch

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

Change 702203 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiImageRotate

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

Change 702234 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiDelete

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

Change 702238 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiSetPageLanguage

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

Change 702238 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiSetPageLanguage

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

Change 702234 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiDelete

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

Change 702228 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiOpenSearch

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

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

[mediawiki/core@master] ApiParse: inject services

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

Change 702335 merged by jenkins-bot:

[mediawiki/core@master] ApiParse: inject services

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

Change 702458 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiEditPage

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

Change 702464 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQuery class

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

Change 702458 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiEditPage

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

Change 702932 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiUpload class

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

Change 702945 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryDuplicateFiles

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

Change 702971 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryLangLinks

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

Change 702974 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryLinks class

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

Change 702945 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryDuplicateFiles

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

Change 702974 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryLinks

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

Change 702998 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryContributors

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

Change 702971 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryLangLinks

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

Change 702999 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryImageInfo/ApiQueryStashImageInfo

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

Change 702998 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryContributors

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

Change 703001 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryFileRepoInfo

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

Change 703002 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryAuthManagerInfo

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

Change 703006 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryAllLinks

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

Change 703007 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject ChangeTagDefStore into ApiQueryLogEvents

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

Change 703002 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryAuthManagerInfo

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

Change 703009 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryQueryPage

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

Change 703009 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryQueryPage

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

Change 703007 merged by jenkins-bot:

[mediawiki/core@master] api: Inject ChangeTagDefStore into ApiQueryLogEvents

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

Change 703006 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryAllLinks

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

Change 703035 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryFileRepoInfo

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

Change 703036 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryAllPages

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

Change 703041 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryDeletedRevisions

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

Change 703044 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryRecentChanges

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

Change 703045 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQuerySearch class/SearchApi trait

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

Change 703047 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryAllMessages

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

Change 703049 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryWatchlistRaw/ApiQueryWatchlist

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

Change 703050 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQuerySiteinfo

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

Change 703051 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryAllUsers

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

Change 703054 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryUsers

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

Change 703055 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryUserContribs

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

Change 703056 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiQueryDeletedrevs

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

Change 703051 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryAllUsers

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

Change 703050 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQuerySiteinfo

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

Change 703056 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryDeletedrevs

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

Change 703055 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryUserContribs

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

Change 703054 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryUsers

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

Change 703044 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryRecentChanges

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

Change 703036 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryAllPages

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

Change 703035 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryAllImages

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

Change 703047 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryAllMessages

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

Change 703049 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryWatchlistRaw/ApiQueryWatchlist

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

Change 703057 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Change object specs for remaining un-serviced api modules

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

Change 703063 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] api: Inject services into ApiWatchlistTrait

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

Change 702999 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryImageInfo/ApiQueryStashImageInfo

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

Change 703045 merged by jenkins-bot:

[mediawiki/core@master] api: Use injected services in ApiQuerySearch

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

Change 702932 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiUpload class

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

Change 703001 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQueryFileRepoInfo

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

Change 703041 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiQuery(All)(Deleted)Revisions

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

Change 703063 merged by jenkins-bot:

[mediawiki/core@master] api: Inject services into ApiWatchlistTrait

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

Change 703057 merged by jenkins-bot:

[mediawiki/core@master] API: Change object specs for remaining un-serviced API modules

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

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

[mediawiki/core@master] SpecialMovePage: stop faling back to global state

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

Change 725313 merged by jenkins-bot:

[mediawiki/core@master] SpecialMovePage: stop falling back to global state

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