- I have a base configuration for all the environments.
- Then, I merge it with the specific environment configuration.
- Finally, I merge it with the local configuration.
config/ base.php local.php development.php production.php console.php
I would like to see Yii providing an easy way of doing this without the dirty CMap::mergeArray() calls inside the config files. This feature should not be enabled by default because it is less flexible.
I usually define the environment on the index.php / yiic.php
Optionally: For very complex applications I use folder-based configurations with a bootstrap script that merges all the files of the folder in a single array, saving it in the cache.

Help

This topic is locked













