Page MenuHomePhabricator

There should be a way to process config options in ExtensionRegistry
Closed, ResolvedPublic

Description

Currently, the ExtensionProcessor processes and handles all the configuration stuff of an extension. It takes all keys from the config object of the JSON, takes the value and puts it into the globals array prefixed with wg. However, this has two problems:

  • The other values of an object in the config object (like description) is currently unused and can't be used in any way
  • If a change (e.g. the parent one of this task) wants to use these values, it needs to implement it in the ExtensionProcessor and invalidates the cache of the ExtensionProcessor output at least once
  • The way how configurations are handles is hardcoded to use the GlobalVarConfig (because all configs are put into the global state)
  • The ExtensionProcessor is (in the best case) not called at every request, as the result of it is cached, so the code that processes things when ExtensionProcessor is called needs to keep this in mind.

There should be a way to process the configurations (like globals and autoloaderPaths and other ones) after they're extracted from the json, e.g. in the ExtensionRegistry. For example, there could be a separate array (configs) (like globals), which can be used in ExtensionRegistry.

Details

Related Gerrit Patches:

Event Timeline

Florian created this task.Jan 21 2017, 8:47 PM

Change 331956 had a related patch set uploaded (by Florianschmidtwelzow):
Expose config array to ExtensionRegistry

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

Change 331956 merged by jenkins-bot:
[mediawiki/core@master] registration: Expose config array to ExtensionRegistry

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

Florian closed this task as Resolved.Jul 20 2018, 11:02 AM