Page MenuHomePhabricator

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


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.