Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using plugin settings it is not possible to provide "local" values #6729

Open
tsteur opened this issue Nov 26, 2014 · 4 comments
Open
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.

Comments

@tsteur
Copy link
Member

tsteur commented Nov 26, 2014

Use case: Imagine a plugin where you configure Redis connection details via the Settings API. You most likely want to reuse the Settings class for this in Integration tests etc. The problem is the Settings API lets you define default values eg 127.0.0.1:6379 but you won't be able to change this default configuration when running the tests locally. Eg I'd like to configure 192.168.33.10:6379.

I don't know what the best way is to solve this. Probably default values should be optionally configured in a config file but this would require maybe something like #6609

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels Nov 26, 2014
@tsteur
Copy link
Member Author

tsteur commented Nov 27, 2014

FYI: Now that #6728 optimized the code of the Settings API a lot we could easily write a new "Storage" adapter that can read config values from a local config.ini or whatever. The Storage Adapter would then be returned in Piwik\Settings\Storage\Factory::make()

@mattab mattab added this to the Short term milestone Dec 1, 2014
@mattab
Copy link
Member

mattab commented Dec 1, 2014

we could easily write a new "Storage" adapter that can read config values from a local config.ini

Not sure if I understood correct, but imo it works well to reuse the config/config.ini.php rather than have user create config files in plugins/ folder.

@tsteur
Copy link
Member Author

tsteur commented Dec 2, 2014

That's exactly what this is about

a new "Storage" adapter that can read config values from a local config.ini

@mattab
Copy link
Member

mattab commented Dec 2, 2014

👍

@mattab mattab modified the milestones: Short term, Mid term Dec 18, 2014
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants