Plugins, even our plugins shipped with core, should ideally not add any config entries to
/config/global.ini.php. Sometimes plugins can maybe use the Settings API instead of a config but this is not always possible or not always wanted see ThaDafinser/IntranetGeoIP#5.
As a plugin should represent the core they could provide their own
It is still nice to have all possible config entries in one file for users. Therefore we could maybe merge it automatically into a section
[PluginName] config entries from plugin... in
/config/global.ini.php. Although a plugin would then have to know that it needs to access its config entries with
$config['PluginName]->configentry. So we'd maybe have to provide a
Plugin Config API.
Maybe we could also allow plugins to change default settings this way? Although this can be already done using the Config API (only kinda, not in the same way as of "Global Config overwritten by Plugin Config overwritten by User Config").
There might be better solutions... I've only identified this "problem" so far but haven't thought so much about possible solutions.
Another possibility could be to let users retrieve the config via a command and also let users change config entries via a command so it wouldn't matter whether they are in different files or not.
config:set configentry value etc. There could be also options / arguments for searching for config entries etc
Have a look at #6656 I'm suggesting to add configs in plugins
With DI this is implemented.