If a user isn't provided, it uses global $wgUser
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T11968 Reduce use of global and public variables | |||
Open | None | T159283 Deprecate non-configuration globals | |||
Open | DannyS712 | T159299 Deprecate and remove $wgUser | |||
Resolved | DannyS712 | T267861 [GOAL] Emit deprecation warnings reading from $wgUser | |||
Open | DannyS712 | T243708 Mediawiki core needs uses of global $wgUser removed | |||
Resolved | DannyS712 | T242935 Deprecate core fallbacks to $wgUser | |||
Resolved | DannyS712 | T246861 Deprecate not passing a user to ParserOptions::__construct and ::newCanonical |
Event Timeline
Change 577406 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/FeaturedFeeds@master] Pass a user when creating a new ParserOptions
Change 577406 merged by jenkins-bot:
[mediawiki/extensions/FeaturedFeeds@master] Pass a user when creating a new ParserOptions
Change 577710 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Math@master] User ParserOptions::newFromAnon instead of relying on wgUser
Change 577711 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/MediaWikiChat@master] Pass a user when creating a new ParserOptions
Change 577712 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/MultiBoilerplate@master] Pass a user when creating a new ParserOptions
Change 577713 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/News@master] Pass a user when creating a new ParserOptions
Change 577714 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/NewUserMessage@master] Pass a user when creating a new ParserOptions
Change 577716 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/ProofreadPage@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577717 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Scribunto@master] Don't fall back to global $wgUser when creating ParserOptions
Change 577718 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/MintyDocs@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577719 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/MassMessage@master] Pass a user when creating a new ParserOptions
Change 576914 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Pass a user when creating a new ParserOptions
Change 577720 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/LiquidThreads@master] Pass a user when creating a new ParserOptions
Change 577721 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] MessageCache: Pass a user when creating a new ParserOptions
Change 577722 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Wikibase@master] Don't fall back to global $wgUser when creating ParserOptions
Change 577723 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Kartographer@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577724 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Babel@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577719 merged by jenkins-bot:
[mediawiki/extensions/MassMessage@master] Pass a user when creating a new ParserOptions
Change 577721 merged by jenkins-bot:
[mediawiki/core@master] MessageCache: Pass a user when creating a new ParserOptions
Change 577723 merged by jenkins-bot:
[mediawiki/extensions/Kartographer@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577724 merged by jenkins-bot:
[mediawiki/extensions/Babel@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577717 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@master] Don't fall back to global $wgUser when creating ParserOptions
Change 577710 merged by jenkins-bot:
[mediawiki/extensions/Math@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577711 merged by jenkins-bot:
[mediawiki/extensions/MediaWikiChat@master] Pass a user when creating a new ParserOptions
Change 577713 merged by jenkins-bot:
[mediawiki/extensions/News@master] Pass a user when creating a new ParserOptions
Change 577921 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/BlueSpiceRSSFeeder@master] Don't fall back to global $wgUser when creating ParserOptions
Change 577925 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/CollaborationKit@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577927 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/SecurePoll@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577930 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/PhpTagsStorage@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577931 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/MassMessageEmail@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 578043 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/TEI@master] Pass a user to ParserOptions::newCanonical
Change 577720 merged by jenkins-bot:
[mediawiki/extensions/LiquidThreads@master] Pass a user when creating a new ParserOptions
Change 577714 merged by jenkins-bot:
[mediawiki/extensions/NewUserMessage@master] Pass a user when creating a new ParserOptions
Change 577722 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577925 merged by jenkins-bot:
[mediawiki/extensions/CollaborationKit@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577931 merged by jenkins-bot:
[mediawiki/extensions/MassMessageEmail@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 578043 merged by jenkins-bot:
[mediawiki/extensions/TEI@master] Replace ParserOptions::newCanonical with ::newFromUser, pass a user
Change 579111 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Wikibase@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 579112 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/ParserMigration@master] Pass a user when creating a new ParserOptions
Change 579113 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/GrowthExperiments@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577921 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceRSSFeeder@master] Don't fall back to global $wgUser when creating ParserOptions
Change 577716 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 579113 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Pass 'canonical' for creating ParserOptions instead of using on $wgUser
Uses of new ParserOptions in deployed extensions that still need to be updated:
- SecurePoll
- EventLogging
- EntitySchema
- CollaborationKit
- AbuseFilter
- Quiz
- Flow
- Wikibase
Also: core, vendor
Uses of ParserOptions::newCanonical in deployed extensions that still need to be updated:
- Wikibase
- ProofreadPage
Also: parsoid, vendor, core
Change 577718 merged by jenkins-bot:
[mediawiki/extensions/MintyDocs@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 577930 merged by Umherirrender:
[mediawiki/extensions/PhpTagsStorage@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 579111 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Don’t rely on $wgUser when creating ParserOptions in test
Change 577927 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Use ParserOptions::newFromUser with conext user
Change 577712 merged by jenkins-bot:
[mediawiki/extensions/MultiBoilerplate@master] Pass a user when creating a new ParserOptions
Change 579112 merged by jenkins-bot:
[mediawiki/extensions/ParserMigration@master] Pass a user when creating a new ParserOptions
And here I was just trying to set up my Vagrant env to review this. Oh well. Thanks, guys!
Change 595541 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/ProofreadPage@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 576916 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Use ParserOptions::newFromUser() instead of relying on global $wgUser
Change 595541 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Use ParserOptions::newFromAnon() instead of relying on global $wgUser
Change 605694 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate calling ParserOptions::newCanonical with no parameters
Change 605694 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate calling ParserOptions::newCanonical with no parameters
Change 606787 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/EventLogging@master] JsonSchemaTest: Pass a user when creating ParserOptions
Change 606788 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Quiz@master] Tests: Pass a user when creating ParserOptions objects
Change 606787 merged by jenkins-bot:
[mediawiki/extensions/EventLogging@master] JsonSchemaTest: Pass a user when creating ParserOptions
Change 626900 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/EntitySchema@master] Pass a user when creating ParserOptions
Change 626901 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Flow@master] convertToText - use ParserOptions::newFromAnon
Change 606788 merged by jenkins-bot:
[mediawiki/extensions/Quiz@master] Tests: Pass a user when creating ParserOptions objects
Change 626901 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] convertToText - use ParserOptions::newFromAnon
Status update:
ParserOptions::newCanonical emits deprecation warnings if the first parameter is null, which results in a fallback to $wgUser in the constructor
Constructor does not yet emit deprecation warnings if called without a user.
Remaining uses without a user:
Wikibase: CachingKartographerEmbeddingHandler (the other uses of ParserOptions in wikibase generally refer to ValueParsers\ParserOptions)
EntitySchema: EntitySchemaContentTest - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/EntitySchema/+/626900/
Jade: EntityBuilder
a bunch in core
Change 626900 merged by jenkins-bot:
[mediawiki/extensions/EntitySchema@master] Pass a user when creating ParserOptions
Change 627220 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Wikibase@master] CachingKartographerEmbeddingHandler: Pass a user to ParserOptions
Change 627221 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Jade@master] EntityBuilder: Pass a user to ParserOptions
Change 627221 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] EntityBuilder: Pass a user to ParserOptions
Jade and EntitySchema done, Wikibase patch pending at https://gerrit.wikimedia.org/r/627220
Change 627220 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] CachingKartographerEmbeddingHandler: Pass a user to ParserOptions
Change 628220 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] ParserOptions: Deprecate fallback to $wgUser
Change 628367 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Flow@master] Utils: Pass a user to ParserOptions
Change 628367 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Use ParserOptions::newFromAnon()
Change 628220 merged by jenkins-bot:
[mediawiki/core@master] ParserOptions: Deprecate fallback to $wgUser