How to set my own parameters and symfony2 config

I want to use my own parametes.ini file in my symfony project.
Does anyone know about this?
I know this file

#app/config/parameters.ini 

but I want to include my own.

+1
source share
2 answers

There are lines in your app/config/config.yml :

 imports: - { resource: parameters.yml } - { resource: security.yml } 

Just add your file there.

 imports: ... - { resource: your_custom_file.yml } 

Your user file must be in the app/config directory. If you want to include a file from the Bundle, you can import it as follows:

 imports: ... - { resource: "@YourBundle/Resources/config/your_custom_file.yml" } 
+1
source

The parameters.ini file should be ignored in VCS. Instead, copy it to parameters.ini.dist and place it under the VCS control. Then, during development, each developer copies parameters.ini.dist to parameters.ini and changes the parameters to their own needs.

0
source

All Articles