Page MenuHomePhabricator

Get rid of $wg = $wmg hack for extensions that have been converted to using extension.json
Open, LowPublic

Description

The $wgFoo = $wmgFoo hack was needed for extensions because InitialiseSettings.php would run before extensions were loaded, so the extension defaults would overwrite the wanted values. But extension.json doesn't unconditionally set defaults if they're already set, so we don't need this hack anymore!

Example change: https://gerrit.wikimedia.org/r/#/c/237686/

This will reduce the amount of globals we use, and hopefully will help a little with T103886.

Details

SubjectRepoBranchLines +/-
operations/mediawiki-configmaster+8 -29
operations/mediawiki-configmaster+0 -10
operations/mediawiki-configmaster+1 -3
operations/mediawiki-configmaster+11 -3
operations/mediawiki-configmaster+1 -1
operations/mediawiki-configmaster+2 -3
operations/mediawiki-configmaster+1 -1
operations/mediawiki-configmaster+1 -1
operations/mediawiki-configmaster+1 -1
operations/mediawiki-configmaster+1 -1
operations/mediawiki-configmaster+3 -3
operations/mediawiki-configmaster+1 -1
operations/mediawiki-configmaster+7 -5
operations/mediawiki-configmaster+2 -2
operations/mediawiki-configmaster+3 -2
operations/mediawiki-configmaster+2 -2
operations/mediawiki-configmaster+2 -2
operations/mediawiki-configmaster+2 -2
operations/mediawiki-configmaster+2 -2
operations/mediawiki-configmaster+2 -2
operations/mediawiki-configmaster+2 -2
operations/mediawiki-configmaster+2 -2
operations/mediawiki-configmaster+2 -2
operations/mediawiki-configmaster+3 -3
operations/mediawiki-configmaster+1 -1
operations/mediawiki-configmaster+1 -4
operations/mediawiki-configmaster+9 -11
operations/mediawiki-configmaster+6 -11
Show related patches Customize query in gerrit

Event Timeline

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

@Legoktm Like this?

Looks good! At the same time, we should also change the require_once invocation to wfLoadExtension and update extension-list if they haven't been updated already.

Ideally, we should deploy this change extension per extension to allow test with a disruption limited to at most one extension, shouldn't we?

Agreed.

Change 266470 had a related patch set uploaded (by Dereckson):
Get rid of $wg = $wmg for BetaFeatures

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

Change 266433 merged by jenkins-bot:
Use extension registration for Graph

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

Change 268627 had a related patch set uploaded (by Dereckson):
Use extension registration for CategoryTree

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

Change 266470 merged by jenkins-bot:
Get rid of $wg = $wmg for BetaFeatures

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

Change 270145 had a related patch set uploaded (by Dereckson):
Use extension registration for Math

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

Change 270145 merged by jenkins-bot:
Use extension registration for Math

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

Change 279268 had a related patch set uploaded (by Dereckson):
Use extension registration for Cite

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

Change 279268 merged by jenkins-bot:
Use extension registration for Cite

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

Change 279371 had a related patch set uploaded (by Dereckson):
Enable extension registration for InputBox

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

Change 279372 had a related patch set uploaded (by Dereckson):
Enable extension registration for ParserFunctions

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

Change 279294 merged by jenkins-bot:
Update extension-list for extension registration

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

Change 279371 merged by jenkins-bot:
Enable extension registration for InputBox

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

Change 279372 merged by jenkins-bot:
Enable extension registration for ParserFunctions

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

Change 280223 had a related patch set uploaded (by Dereckson):
Use extension registration for ImageMap

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

Change 280224 had a related patch set uploaded (by Dereckson):
Use extension registration for SyntaxHighlight_GeSHi

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

Change 280225 had a related patch set uploaded (by Dereckson):
Use extension registration for DoubleWiki

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

Change 280226 had a related patch set uploaded (by Dereckson):
Use extension registration for Poem

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

Change 280227 had a related patch set uploaded (by Dereckson):
Use extension registration for UnicodeConverter

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

Change 280223 merged by jenkins-bot:
Use extension registration for ImageMap

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

Change 280224 merged by jenkins-bot:
Use extension registration for SyntaxHighlight_GeSHi

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

Change 280225 merged by jenkins-bot:
Use extension registration for DoubleWiki

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

Change 280226 merged by jenkins-bot:
Use extension registration for Poem

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

Change 280242 had a related patch set uploaded (by Dereckson):
Use extension registration for DoubleWiki

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

Change 280227 merged by jenkins-bot:
Use extension registration for UnicodeConverter

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

Change 280242 merged by jenkins-bot:
Use extension registration for DoubleWiki

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

Change 281237 had a related patch set uploaded (by Dereckson):
Use extension registration for LabeledSectionTransclusion

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

Change 281239 had a related patch set uploaded (by Dereckson):
Use extension registration for SpamBlacklist

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

Change 281240 had a related patch set uploaded (by Dereckson):
Use extension registration for TitleBlacklist

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

Change 281242 had a related patch set uploaded (by Dereckson):
Use extension registration for Quiz

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

Change 281243 had a related patch set uploaded (by Dereckson):
Use extension registration for FundraisingTranslateWorkflow

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

Change 281244 had a related patch set uploaded (by Dereckson):
Use extension registration for Gadgets

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

Change 281246 had a related patch set uploaded (by Dereckson):
Use extension registration for MwEmbedSupport

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

Change 281303 had a related patch set uploaded (by Dereckson):
Use extension registration for ExtensionDistributor

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

Change 281311 had a related patch set uploaded (by Dereckson):
Use extension registration for GlobalBlocking

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

Change 281976 had a related patch set uploaded (by Dereckson):
Use extension registration for ProofreadPage

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

We've a backlog of changes to merge.

I've moved back to the backlog as anybody can take one of the dozens remaining extension include to migrate.

Change 281239 merged by jenkins-bot:
Use extension registration for SpamBlacklist

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

Mentioned in SAL [2016-06-01T23:49:49Z] <dereckson@tin> Synchronized wmf-config/CommonSettings.php: Use extension registration for SpamBlacklist (T119117) (duration: 00m 24s)

Mentioned in SAL [2016-06-01T23:51:30Z] <dereckson@tin> Synchronized wmf-config/CommonSettings.php: Revert Use extension registration for SpamBlacklist (T119117) (duration: 00m 24s)

Change 292312 had a related patch set uploaded (by Dereckson):
Use extension registration for SpamBlacklist

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

Change 281237 merged by jenkins-bot:
Use extension registration for LabeledSectionTransclusion

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

Mentioned in SAL [2016-06-30T15:53:33Z] <thcipriani@tin> Synchronized wmf-config: SWAT: [[gerrit:281237|Use extension registration for LabeledSectionTransclusion (T119117)]] (duration: 00m 27s)

Change 281240 merged by jenkins-bot:
Use extension registration for TitleBlacklist

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

Mentioned in SAL [2016-06-30T16:15:43Z] <thcipriani@tin> Synchronized wmf-config/InitialiseSettings.php: SWAT: [[gerrit:281240|Use extension registration for TitleBlacklist (T119117)]] PART I (duration: 00m 39s)

Mentioned in SAL [2016-06-30T16:16:51Z] <thcipriani@tin> Synchronized wmf-config: SWAT: [[gerrit:281240|Use extension registration for TitleBlacklist (T119117)]] PART II (duration: 00m 36s)

Change 281243 merged by jenkins-bot:
Use extension registration for FundraisingTranslateWorkflow

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

Change 292312 merged by jenkins-bot:
Use extension registration for SpamBlacklist

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

Change 281303 merged by jenkins-bot:
Use extension registration for ExtensionDistributor

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

Change 281246 merged by jenkins-bot:
Use extension registration for MwEmbedSupport

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

Change 281242 merged by jenkins-bot:
Use extension registration for Quiz

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

Change 281976 merged by jenkins-bot:
Use extension registration for ProofreadPage

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

Change 281244 merged by jenkins-bot:
Use extension registration for Gadgets

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

Change 281311 merged by jenkins-bot:
Use extension registration for GlobalBlocking

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

Change 268627 merged by jenkins-bot:
Use extension registration for CategoryTree

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

Change 502269 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[operations/mediawiki-config@master] Stop using wmg variables for Score extension

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

Change 502269 merged by jenkins-bot:
[operations/mediawiki-config@master] CommonSettings: Stop using wmg variables for Score extension

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

Change 905711 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[operations/mediawiki-config@master] Stop using redundant $wmg variables for VisualEditor extension (3/3)

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

Change 905751 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[operations/mediawiki-config@master] Stop using redundant $wmg variable for MobileFrontend extension (2/2)

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

Change 905751 merged by jenkins-bot:

[operations/mediawiki-config@master] Stop using redundant $wmg variable for MobileFrontend extension

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

Mentioned in SAL (#wikimedia-operations) [2023-04-13T20:48:40Z] <urbanecm@deploy2002> Started scap: Backport for [[gerrit:907743|Only log 'visualEditorFeatureUse' events if 'editAttemptStep' events are being logged (T334157)]], [[gerrit:905751|Stop using redundant $wmg variable for MobileFrontend extension (T119117)]]

Mentioned in SAL (#wikimedia-operations) [2023-04-13T20:50:01Z] <urbanecm@deploy2002> urbanecm and matmarex: Backport for [[gerrit:907743|Only log 'visualEditorFeatureUse' events if 'editAttemptStep' events are being logged (T334157)]], [[gerrit:905751|Stop using redundant $wmg variable for MobileFrontend extension (T119117)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-04-13T20:55:07Z] <urbanecm@deploy2002> Finished scap: Backport for [[gerrit:907743|Only log 'visualEditorFeatureUse' events if 'editAttemptStep' events are being logged (T334157)]], [[gerrit:905751|Stop using redundant $wmg variable for MobileFrontend extension (T119117)]] (duration: 06m 26s)

Change 905711 merged by jenkins-bot:

[operations/mediawiki-config@master] Stop using redundant $wmg variables for VisualEditor extension

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

Mentioned in SAL (#wikimedia-operations) [2023-04-17T20:17:31Z] <urbanecm@deploy2002> Started scap: Backport for [[gerrit:905711|Stop using redundant $wmg variables for VisualEditor extension (T119117)]]

Mentioned in SAL (#wikimedia-operations) [2023-04-17T20:18:49Z] <urbanecm@deploy2002> urbanecm and matmarex: Backport for [[gerrit:905711|Stop using redundant $wmg variables for VisualEditor extension (T119117)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-04-17T20:25:50Z] <urbanecm@deploy2002> Finished scap: Backport for [[gerrit:905711|Stop using redundant $wmg variables for VisualEditor extension (T119117)]] (duration: 08m 19s)