Page MenuHomePhabricator

Make SettingsLoader available in LocalSettings.php
Open, Needs TriagePublic

Description

It should be possible to use the SettingsLoader inside LocalSettings.php to get settings from different files in various locations. This allows the old configuration mechanism (php code setting global variables) to be combine with the new one SettingsLoader ingesting JSON files.

NOTE: this is part of prototyping a solution for T292402

Event Timeline

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

[mediawiki/core@master] Allow $wgSettings to be used in LocalSettings.

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

Change 738283 merged by jenkins-bot:

[mediawiki/core@master] Allow $wgSettings to be used in LocalSettings.

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

Hint: Moving the inclusion of includes/DefaultSettings.php below the composer-autoloader [1] means that files registered in autoload.files of a composer.json can not access any settings anymore (e.g. $wgServiceWiring, $wgHooks, ...)

[1] https://github.com/wikimedia/mediawiki/commit/80fd54ffb028a649e322ad5548832edaa9081954#diff-24862a5974780dc98b9d8c039d40e2e4fbba7e71e23f1e660eda4a3d02335f77L105-R132