Configs exist in three levels:
- local
- dev | stg | prod
- default (no environment)
There are three types of configs:
- Application-level
- Global-level
- Global-level, but feature-specific (e.g. api_router)
Application-level configurations should start off by including their logical parent, applicational-level config, followed by their global-level configuration and/or any global, feature-specific configs (if applicable). Global-level configurations should not include logical parents, since application-level configs do that, but they may include global, feature-specific configs.
app/config/config_local.yml (8) imports:
* app/config/dev.yml (5), which imports:
* app/config/config.yml (2), which imports
* /config/config.yml (1)
* /config/config_dev.yml (4), which imports:
* /config/dev/api_router.yml (3)
* /config/local.yml (7), which imports
* /config/local/api_router.yml (6)
The numbers beside each file indicate the order in which their contents will be processed. Alternatively:
- /config/config.yml
- app/config/config.yml
- /config/dev/api_router.yml
- /config/config_dev.yml
- app/config/dev.yml
- /config/local/api_router.yml
- /config/local.yml
- app/config/config_local.yml
The rule of thumb is lowest level first, and for each level, global before application.