Development

ref/DirConfig

You must first sign up to be able to contribute.

config

A collection of directories that store a number of configuration files at the project, application, and module level of the directory structure. Becoming familiar with where to adjust these configuration files and what is available to you in each is a large step to mastering symfony development.

Much of a symfony project is driven by configuration settings. These are typically maintained in these directories located thought your project. Some of the configuration will be read and loaded at run time (often being cached). Some of the configuration will be read by tasks and generate classes into the project file structure.

Locations

/<projname>/config
/<projname>/apps/<appname>/config
/<projname>/apps/<appname>/modules/<modname>/config

Contents

There are a variety of files that may or may not exist in any given config directory. Here is a list of some of them:

Examples

listing from Jobeet:

> find . -name config -print -exec ls -l '{}' \;
./apps/backend/config
-rw-r--r--  1 user  staff    23 Jan  5 15:17 app.yml
-rw-r--r--@ 1 user  staff   135 Jan 15 11:18 backendConfiguration.class.php
-rw-r--r--  1 user  staff    70 Jan  5 15:17 cache.yml
-rw-r--r--  1 user  staff  3463 Jan  5 15:17 factories.yml
-rw-r--r--  1 user  staff    98 Jan  5 15:17 filters.yml
-rw-r--r--@ 1 user  staff   853 Jan 15 10:21 routing.yml
-rw-r--r--@ 1 user  staff    38 Jan 15 11:10 security.yml
-rw-r--r--@ 1 user  staff  4413 Jan 15 11:09 settings.yml
-rw-r--r--  1 user  staff   321 Jan  5 15:17 view.yml

./apps/backend/modules/affiliate/config
-rw-r--r--@ 1 user  staff  809 Jan 15 10:46 generator.yml

./apps/backend/modules/category/config
-rw-r--r--@ 1 user  staff  719 Jan  7 13:02 generator.yml

./apps/backend/modules/job/config
-rw-r--r--@ 1 user  staff  1612 Jan 12 11:19 generator.yml

./apps/frontend/config
-rw-r--r--  1 user  staff    70 Dec  4 16:23 cache.yml
-rw-r--r--  1 user  staff  3463 Dec  4 16:23 factories.yml
-rw-r--r--  1 user  staff    98 Dec  4 16:23 filters.yml
-rw-r--r--  1 user  staff   112 Dec  4 16:23 frontendConfiguration.class.php
-rw-r--r--@ 1 user  staff  1229 Jan 12 14:12 routing.yml
-rw-r--r--  1 user  staff    26 Dec  4 16:23 security.yml
-rw-r--r--  1 user  staff  4219 Dec  4 16:23 settings.yml
-rw-r--r--@ 1 user  staff   321 Dec 15 10:41 view.yml

./config
-rw-r--r--@ 1 user  staff   895 Jan 14 15:56 ProjectConfiguration.class.php
-rw-r--r--@ 1 user  staff   102 Dec 17 10:19 app.yml
-rw-r--r--@ 1 user  staff   631 Dec 17 13:39 databases.yml
drwxr-xr-x  4 user  staff   136 Jan  9 14:40 doctrine
drwxr-xr-x  5 user  staff   170 Jan  8 15:32 error
-rw-r--r--  1 user  staff  2209 Dec 11 11:07 propel.ini
-rw-r--r--  1 user  staff    24 Dec  4 16:23 properties.ini
-rw-r--r--  1 user  staff    51 Dec  4 16:23 rsync_exclude.txt
-rw-r--r--  1 user  staff   666 Dec  4 16:23 vhost.sample

References

  • The Definitive Guide to symfony, Chapter 5 - Configuring Symfony
  • The Definitive Guide to symfony, Chapter 19 - Mastering Symfony's Configuration Files