Page MenuHomePhabricator

Create a SettingsLoader class for loading settings from JSON files
Open, Needs TriagePublic


SettingsLoader should be able to load JSON files provided by name and path, relative to a base directory provided to SettingsLoader via a setter.

Settings files are structured similarly to extension.json files. Initially, they need to support two keys:

  • "config" for configuration variables
  • "extensions" for listing extensions to load.

When loading settings from multiple files, the content of each top level key is combined using a shallow array_mege.

NOTE: this is part of prototyping a solution for T292402

Event Timeline

Change 737752 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] WIP: SettingsBuilder

Change 737752 merged by jenkins-bot:

[mediawiki/core@master] Introducing SettingsBuilder for loading settings files.