Page MenuHomePhabricator

Simplify string|array argument type for ParserOutput::addModules()/::addModuleStyles()/::addJsConfigVars()
Closed, ResolvedPublic

Description

The ::addModules()/::addModuleStyles()/::addJsConfigVars() methods all take a string|array type. It would be better to simplify this.

One option would be string ...$modules and pass arrays with ...$array where needed. But the method names are already plural and strings are already cast to (array) already. So it's preferable to make the argument type string[] and have the callers explicitly create the array where necessary.

The addJsConfigVars method should probably always take a key->value associative array, and just change the callers in those (rare?) cases where a single key and value is passed.

It may be desirable to ensure that a given key is only written once by addJsConfigVars; see discussion in comments below.

We also need to better document these methods for ContentMetadataCollector; the current documentation has a @see OutputPage which of course isn't present in Parsoid.

Some codesearches to find usage:

Details

SubjectRepoBranchLines +/-
mediawiki/extensions/Interlanguagemaster+19 -4
mediawiki/extensions/SemanticSiftermaster+1 -1
mediawiki/extensions/TextScrollermaster+2 -2
mediawiki/extensions/Tabbermaster+1 -1
mediawiki/extensions/Surveymaster+1 -1
mediawiki/extensions/SoundManager2Buttonmaster+1 -1
mediawiki/extensions/SocialProfilemaster+3 -3
mediawiki/extensions/SideBarMenumaster+1 -1
mediawiki/extensions/Screenplaymaster+1 -1
mediawiki/extensions/PanScrollmaster+1 -1
mediawiki/extensions/MsCalendarmaster+1 -2
mediawiki/extensions/ImageComparemaster+2 -2
mediawiki/extensions/HierarchyBuildermaster+2 -2
mediawiki/extensions/BibManagermaster+2 -2
mediawiki/extensions/AJAXPollmaster+1 -1
mediawiki/extensions/VoteNYmaster+2 -2
mediawiki/extensions/ShowMemaster+1 -1
mediawiki/extensions/RandomGameUnitmaster+1 -1
mediawiki/extensions/PopupAlertsmaster+1 -1
mediawiki/extensions/WikiCategoryTagCloudmaster+1 -1
mediawiki/extensions/YouTubemaster+1 -1
mediawiki/extensions/Sparkmaster+2 -2
mediawiki/extensions/BlueSpiceSubPageTreeREL1_35+1 -1
mediawiki/extensions/BlueSpiceSignHereREL1_35+2 -2
mediawiki/extensions/BlueSpiceSubPageTreemaster+1 -1
mediawiki/extensions/BlueSpiceSignHeremaster+2 -2
mediawiki/extensions/SimpleCalendarmaster+1 -1
mediawiki/extensions/BlueSpiceChecklistmaster+5 -4
mediawiki/extensions/TwitterTagmaster+1 -1
mediawiki/extensions/PageFormsmaster+6 -6
mediawiki/extensions/WikiForummaster+2 -2
mediawiki/extensions/CountDownClockmaster+1 -1
mediawiki/extensions/ImageRatingmaster+1 -1
mediawiki/extensions/Capiuntomaster+1 -1
mediawiki/extensions/TEImaster+1 -1
mediawiki/extensions/StructuredNavigationmaster+1 -1
mediawiki/extensions/MediaUploadermaster+1 -1
mediawiki/extensions/BlueSpiceSocialProfileREL1_35+2 -2
mediawiki/extensions/BlueSpiceSocialREL1_35+1 -1
mediawiki/extensions/BlueSpiceBookshelfREL1_35+3 -3
mediawiki/extensions/FormsREL1_35+3 -3
mediawiki/extensions/WorkflowsREL1_35+1 -1
mediawiki/extensions/BlueSpiceSocialProfilemaster+2 -2
mediawiki/extensions/BlueSpiceSocialmaster+1 -1
mediawiki/extensions/BlueSpiceBookshelfmaster+3 -3
mediawiki/extensions/Formsmaster+3 -3
mediawiki/extensions/Workflowsmaster+1 -1
mediawiki/extensions/EntitySchemamaster+9 -9
mediawiki/extensions/EntitySchemamaster+3 -3
mediawiki/coremaster+37 -21
mediawiki/extensions/EventLoggingmaster+8 -8
mediawiki/extensions/UploadWizardmaster+4 -6
mediawiki/coremaster+4 -4
mediawiki/extensions/Newslettermaster+1 -1
mediawiki/extensions/WikiLambdamaster+10 -10
mediawiki/extensions/Gadgetsmaster+12 -12
mediawiki/extensions/LinkFiltermaster+1 -1
mediawiki/extensions/Wikibasemaster+15 -12
mediawiki/extensions/Scribuntomaster+31 -31
mediawiki/extensions/Graphmaster+13 -13
mediawiki/extensions/MintyDocsmaster+4 -4
mediawiki/extensions/Babelmaster+1 -1
mediawiki/extensions/timelinemaster+1 -1
mediawiki/extensions/FanBoxesmaster+2 -2
mediawiki/extensions/WikimediaIncubatormaster+1 -1
mediawiki/extensions/Calendarmaster+1 -1
mediawiki/extensions/TemplateDatamaster+1 -1
mediawiki/extensions/Scoremaster+2 -2
mediawiki/extensions/Tabsmaster+1 -1
mediawiki/extensions/Kartographermaster+18 -18
mediawiki/extensions/TimedMediaHandlermaster+3 -3
mediawiki/extensions/Lingomaster+2 -2
mediawiki/extensions/Citemaster+2 -2
mediawiki/extensions/Quizmaster+2 -2
mediawiki/extensions/Wigo3master+2 -2
mediawiki/extensions/SyntaxHighlight_GeSHimaster+7 -7
mediawiki/extensions/CharInsertmaster+2 -2
mediawiki/extensions/wikihieromaster+1 -1
mediawiki/extensions/Translatemaster+6 -2
mediawiki/extensions/ProofreadPagemaster+18 -18
mediawiki/extensions/SemanticDrilldownmaster+1 -1
Show related patches Customize query in gerrit

Related Objects

Event Timeline

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

Change 757755 merged by jenkins-bot:

[mediawiki/extensions/MediaUploader@master] Use array style on adding modules to ParserOutput

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

Is it feasible to backport to wmf/1.38.0-wmf.19 whatever commits are necessary to take care of the deprecation warnings?

Change 757750 merged by Umherirrender:

[mediawiki/extensions/StructuredNavigation@master] Use array style on adding modules to ParserOutput

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

Change 757749 merged by Umherirrender:

[mediawiki/extensions/TEI@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/ImageRating@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/Capiunto@master] Use array style on adding modules to ParserOutput

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

Change 760229 merged by jenkins-bot:

[mediawiki/extensions/Capiunto@master] Use array style on adding modules to ParserOutput

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

Change 759924 merged by jenkins-bot:

[mediawiki/extensions/ImageRating@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/PopupAlerts@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/RandomGameUnit@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/ShowMe@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/VoteNY@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/AJAXPoll@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/BibManager@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/BlueSpiceChecklist@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/BlueSpiceSignHere@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/BlueSpiceSubPageTree@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/CountDownClock@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/HierarchyBuilder@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/ImageCompare@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/Interlanguage@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/MsCalendar@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/PageForms@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/PanScroll@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/Screenplay@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/SemanticSifter@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/SideBarMenu@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/SimpleCalendar@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/SocialProfile@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/SoundManager2Button@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/Spark@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/Survey@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/Tabber@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/TextScroller@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/TwitterTag@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/WikiCategoryTagCloud@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/WikiForum@master] Use array style on adding modules to ParserOutput

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

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

[mediawiki/extensions/YouTube@master] Use array style on adding modules to ParserOutput

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

Change 762033 merged by jenkins-bot:

[mediawiki/extensions/CountDownClock@master] Use array style on adding modules to ParserOutput

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

Change 762052 merged by jenkins-bot:

[mediawiki/extensions/WikiForum@master] Use array style on adding modules to ParserOutput

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

Change 762038 merged by jenkins-bot:

[mediawiki/extensions/PageForms@master] Use array style on adding modules to ParserOutput

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

Change 762050 merged by jenkins-bot:

[mediawiki/extensions/TwitterTag@master] Use array style on adding modules to ParserOutput

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

Change 762029 merged by jenkins-bot:

[mediawiki/extensions/BlueSpiceChecklist@master] Use array style on adding modules to ParserOutput

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

Change 761756 had a related patch set uploaded (by Robert Vogel; author: Umherirrender):

[mediawiki/extensions/BlueSpiceSignHere@REL1_35] Use array style on adding modules to ParserOutput

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

Change 762043 merged by jenkins-bot:

[mediawiki/extensions/SimpleCalendar@master] Use array style on adding modules to ParserOutput

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

Change 761757 had a related patch set uploaded (by Robert Vogel; author: Umherirrender):

[mediawiki/extensions/BlueSpiceSubPageTree@REL1_35] Use array style on adding modules to ParserOutput

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

Change 762031 merged by jenkins-bot:

[mediawiki/extensions/BlueSpiceSignHere@master] Use array style on adding modules to ParserOutput

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

Change 762032 merged by jenkins-bot:

[mediawiki/extensions/BlueSpiceSubPageTree@master] Use array style on adding modules to ParserOutput

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

Change 761756 merged by jenkins-bot:

[mediawiki/extensions/BlueSpiceSignHere@REL1_35] Use array style on adding modules to ParserOutput

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

Change 761757 merged by jenkins-bot:

[mediawiki/extensions/BlueSpiceSubPageTree@REL1_35] Use array style on adding modules to ParserOutput

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

Change 762046 merged by jenkins-bot:

[mediawiki/extensions/Spark@master] Use array style on adding modules to ParserOutput

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

Change 762053 merged by jenkins-bot:

[mediawiki/extensions/YouTube@master] Use array style on adding modules to ParserOutput

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

Change 762051 merged by jenkins-bot:

[mediawiki/extensions/WikiCategoryTagCloud@master] Use array style on adding modules to ParserOutput

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

Change 762015 merged by jenkins-bot:

[mediawiki/extensions/PopupAlerts@master] Use array style on adding modules to ParserOutput

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

Change 762019 merged by jenkins-bot:

[mediawiki/extensions/RandomGameUnit@master] Use array style on adding modules to ParserOutput

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

Change 762021 merged by jenkins-bot:

[mediawiki/extensions/ShowMe@master] Use array style on adding modules to ParserOutput

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

Change 762025 merged by jenkins-bot:

[mediawiki/extensions/VoteNY@master] Use array style on adding modules to ParserOutput

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

Change 762027 merged by jenkins-bot:

[mediawiki/extensions/AJAXPoll@master] Use array style on adding modules to ParserOutput

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

Change 762028 merged by jenkins-bot:

[mediawiki/extensions/BibManager@master] Use array style on adding modules to ParserOutput

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

Change 762034 merged by jenkins-bot:

[mediawiki/extensions/HierarchyBuilder@master] Use array style on adding modules to ParserOutput

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

Change 762035 merged by jenkins-bot:

[mediawiki/extensions/ImageCompare@master] Use array style on adding modules to ParserOutput

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

Change 762037 merged by jenkins-bot:

[mediawiki/extensions/MsCalendar@master] Use array style on adding modules to ParserOutput

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

Change 762039 merged by jenkins-bot:

[mediawiki/extensions/PanScroll@master] Use array style on adding modules to ParserOutput

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

Change 762040 merged by jenkins-bot:

[mediawiki/extensions/Screenplay@master] Use array style on adding modules to ParserOutput

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

Change 762042 merged by jenkins-bot:

[mediawiki/extensions/SideBarMenu@master] Use array style on adding modules to ParserOutput

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

Change 762044 merged by jenkins-bot:

[mediawiki/extensions/SocialProfile@master] Use array style on adding modules to ParserOutput

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

Change 762045 merged by jenkins-bot:

[mediawiki/extensions/SoundManager2Button@master] Use array style on adding modules to ParserOutput

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

Change 762047 merged by jenkins-bot:

[mediawiki/extensions/Survey@master] Use array style on adding modules to ParserOutput

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

Change 762048 merged by jenkins-bot:

[mediawiki/extensions/Tabber@master] Use array style on adding modules to ParserOutput

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

Change 762049 merged by jenkins-bot:

[mediawiki/extensions/TextScroller@master] Use array style on adding modules to ParserOutput

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

Change 762041 merged by jenkins-bot:

[mediawiki/extensions/SemanticSifter@master] Use array style on adding modules to ParserOutput

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

Change 762036 merged by jenkins-bot:

[mediawiki/extensions/Interlanguage@master] Use array style on adding modules to ParserOutput

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