Let plugins provide their own config #6609
Labels
c: Platform
For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone
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/Piwik-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 aPlugin 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.
The text was updated successfully, but these errors were encountered: