Daimona added a comment.

  In T241947#5802594 <https://phabricator.wikimedia.org/T241947#5802594>, 
@Addshore wrote:
  > Well, RequestContext::getMain is slightly less evil that the global 
  Yeah, well, a little bit... I believe the only difference is that, when using 
RequestContext, any piece of code writing to $wgUser and 
RequestContext::getMain only has to write to the latter. Aside from this, 
they're the same thing 
  > So I'd go for lets just make that patch and hen resolve this task for now :)
  > If someone wants to get rid of RequestContext::getMain then that is a whole 
different kettle of fish to tackle later down the line.
  Sure :) In places where a User object can be injected, I believe that it's 
not worth it to use RequestContext::getMain now, and replace it with proper DI 
later. But, where there's no clear way to inject a User, I think 
RequestContext::getMain is acceptable.



To: Daimona
Cc: Addshore, Daimona, Aklapper, Chaytanya, darthmon_wmde, DannyS712, Nandana, 
Kieubinhtb, Guilhermebm, Mh-3110, Amorymeltzer, Asad_Ali_Palijo, Lahi, Gq86, 
GoranSMilovanovic, Soteriaspace, RazeSoldier, Jayprakash12345, 
JakeTheDeveloper, QZanden, LawExplorer, _jensen, rosalieper, D3r1ck01, 
Scott_WUaS, Jonas, MuhammadShuaib, Izno, MGChecker, Tmalhotra, SimmeD, 
Wikidata-bugs, aude, Dinoguy1000, Lydia_Pintscher, Mbch331, Jay8g
Wikidata-bugs mailing list

Reply via email to