@tsteur opened this Issue on November 6th 2014 Member

See #6607

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 config/global.ini.php eg /plugins/ScheduledReports/config/global.ini.php.

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.

@tsteur commented on November 6th 2014 Member

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:list, config:get configentry, config:set configentry value etc. There could be also options / arguments for searching for config entries etc

@mnapoli commented on December 2nd 2014 Contributor

Have a look at #6656 I'm suggesting to add configs in plugins

@tsteur commented on January 16th 2018 Member

With DI this is implemented.

This Issue was closed on January 16th 2018
Powered by GitHub Issue Mirror