Page MenuHomePhabricator

Move optional resource loader registration from PHP code to extension.json when it supports it
Closed, DuplicatePublic

Description

Some extensions register additional resource loader modules when VisualEditor is installed. The MediaWiki extension registry system does not support optional/conditional registrations yet, hence that has been done via the hook ResourceLoaderRegisterModules.

https://gerrit.wikimedia.org/r/#/c/316508/ is a proposal that will eventually add conditional registration in extension.json , once done we should migrate extensions that are using plain PHP, non exhaustive list:

Event Timeline

hashar created this task.Nov 24 2016, 8:13 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 24 2016, 8:13 AM

Change 323356 had a related patch set uploaded (by Hashar):
Revert "Skip registering RL modules depending on VisualEditor"

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

hashar updated the task description. (Show Details)Jan 23 2017, 9:42 AM
hashar updated the task description. (Show Details)

I have proposed a similar hack for SyntaxHighlight_GeSHi: https://gerrit.wikimedia.org/r/333580 Skip registering RL modules depending on VisualEditor.

I have added it to this task description.

TheDJ added a subscriber: TheDJ.Jan 23 2017, 11:01 AM
hashar triaged this task as Medium priority.Jun 16 2017, 10:48 AM

Change 323356 abandoned by Jforrester:
[mediawiki/extensions/Cite@master] Revert "Skip registering RL modules depending on VisualEditor"

Reason:

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