We are currently using the test/dev/main config file set up for our Yii applications.
So when working on an application within the agency we use the test.php config file. In this file we mainly specify local database and email account parameters. Now often the case is we have different parameters for database connection, so when we commit our changes to SVN, unfortunately this config file will overwrite everyone’s database connection parameters.
How can we keep our own database connection parameters but at the same time be able to update test.php config file with other parameters?
In my experience, there is no way that you can only commit a part of the file using svn, we always encounter the conflict or their config file is updated when there were changes made in the config file. So What we did is created new file for all the params => array() values and merge it back to the main array of the config.
SO we have params.php with
$params = array('params'=>
And merge it to test.php
This case you can change the db settings and params and commit them independently.
Put the db section in a php include and set the included file to be ignored by SVN.