3

In the symfony framework, a great many files are auto-generated at various stages of development. Some of these files are meant to be edited and manually-customized while others are meant to never (or very rarely) be hand-edited but instead to change as the result of changes to other configuration or settings files.

Which symfony files fit into this latter category of "avoid hand-editing"? I want to know so I can exclude these files from revision-control. Another reason to know is simply to know which files I should avoid editing.

rlandster
  • 7,294
  • 14
  • 58
  • 96

2 Answers2

10

Note that the GitHub project gitignore has both .gitignore files for symfony or symfony2 projects:

cache/*
log/*
web/uploads/*
config/databases.yml
config/propel.ini
data/sql
lib/filter/doctrine/base/Base*
lib/form/doctrine/base/Base*
lib/model/doctrine/base/Base*
lib/model/om/*
lib/model/map/*
*/logs/*
*/cache/*
web/uploads/*
web/bundles/*

That illustrates the differences and evolutions of the structure of a symfony project.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Note that `databases.yml` and `propel.ini` are excluded because they might contain username/password details, rather than because they shouldn't be edited. – Matt Gibson Feb 28 '11 at 09:45
  • 1
    @Matt: true, so in that case: http://stackoverflow.com/questions/5132152/when-you-have-secret-key-in-your-project-how-can-pushing-to-github-be-possible/5132569#5132569 – VonC Feb 28 '11 at 09:47
0

Don't edit anything that starts with Auto or Base as these files are recreated when you run various build tasks. Edit the files that extend from these classes instead.

Dan
  • 1,065
  • 2
  • 9
  • 16