The symfony framework configurability is one of its most appealing strength, but it is also a thing that comes back over and over again as a weakness. Why? Because some people think that symfony has way too many settings that need to be changed when creating a new project. That's totally wrong. In this post, I will try to give an objective point of view on this matter as of symfony 1.2.
If you read the Jobeet tutorial, you know that you hardly need to open a configuration file to bootstrap a new project. That's because all settings have sensible defaults. And for settings that need to be changed like the database DSN, or the CSRF secret, the framework provides commands that automate the task:
$ php symfony generate:app --escaping-strategy=on --csrf-secret=UniqueSecret frontend
The above command changes the
automatically for us in the
settings.yml configuration file.
$ php symfony configure:database "mysql:host=localhost;dbname=jobeet" root mYsEcret
Again, the above command updates the
databases.yml configuration file.
And for most projects, that's all you need to know. Of course, the
settings.yml configuration file define others settings. Do you know how
many? As of symfony 1.2, 21 different settings:
From these 21 settings, you really need to care about 7 of them:
Why keep settings that barely need to be changed? Some of them were important in the past but are not significant anymore and others are sometimes useful for very specific cases.
Want to learn more about those settings? I have compiled a document with all available settings, their default configuration, and a small description for each of them. This document will be part of an upcoming symfony reference book.
Help the Symfony project!
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.
You're a machine!
You're work is really appreciated :-)