Depending on the admin users / business owners, you may have a hard time getting buy-in. That's your first hurdle.
The other thing you need to address are any modules which use setup scripts to write configuration setting to the database. This is a legitimate practice from which your approach deviates, and it is therefore incumbent on you to deal with this yourself.
You have two areas where your configuration files could be stored. I'll make my recommendation after explaining the process of config loading (for posterity; I suspect you know this already).
When Magento configuration is being compiled, the result is a massive XML DOM which takes up residence in the Mage_Core_Model_Config::_xml
property. The process involves compilation of file-based contents from the following sources, in order:
app/etc/*.xml
(including local.xml
of course)
app/etc/modules/*.xml
app/etc/modules/Mage_All.xml
app/etc/modules/Mage_*.xml
app/etc/modules/[others].xml
- Module config files (
config.xml
)
app/etc/local.xml
(again)
core_config_data
table via Mage_Core_Model_Resource_Config::loadToXml()
You could make use of (1) and just add an additional .xml
file in the app/etc/
directory, but due to the mechanics of configuration merging you would never be able to override default values declared in module config files.
I'd recommend module-based storage, and I'd recommend making that module load after all others. You can do this two ways:
- By simply naming the module's declaration file in such a way that it is last in the list if you do
glob('app/etc/modules/*.xml')
- Finding the last-loaded module and make your module
<depend />
on that module.
Edit: you really should take the module-based approach, because the .xml
files in app/etc/
are not cached! Credit to my friend Vinai for that bit of wisdom!