Page MenuHomePhabricator

Refactor Vector skin to remove use of RequestContext::getMain in service wiring code
Closed, ResolvedPublic0 Estimated Story Points

Description

Using RequestContext::getMain in service wiring code should be avoided as documented on the core ServiceWiring.php and discussed in the declined T218555. In favour of T330109.

The service wiring in Vector skin is using the web request and the user to instance the FeatureManager.
It would be better to have a factory to get called from the skin with the RequestContext and creating the manager from that information.

This would avoid the technical debt with the request.

Event Timeline

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

[mediawiki/skins/Vector@master] Create a FeatureManagerFactory

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

Jdlrobson triaged this task as Medium priority.Mar 8 2024, 10:33 PM

Change 990131 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Create a FeatureManagerFactory

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

Jdlrobson set the point value for this task to 0.Mar 11 2024, 5:08 PM

Mo can you clarify things for Edward here per my earlier comment : T359665#9622064

No QA needed, this change can be checked by pixel as it is stability and refactoring, expectation is no apparent change. Local Pixel passes for me.

Jdlrobson claimed this task.