Recently I received an email from Davert. He noted that the sfSCMIgnoresTaksPlugin would not work on Windows as Windows has a different directory separator. He sent over a patch which uses PHP’s DIRECTORY_SEPARATOR instead of the coded “/”. This makes the plugin compatible on Windows. Thanks Davert. You can read more about the plugin and download the most recent release at http://www.symfony-project.org/plugins/sfSCMIgnoresTaskPlugin.
We use GIT for version control at Setfive. However often with our Symfony projects creating all the ignore files in all the plugins model/base’s and other locations throughout the project get very tiresome. Since on some larger projects you can end up with 10-20 plugins, having to create an ignore for the autogenerated model, forms, and filters takes a long time. Today we really quickly just wrote a plugin that allows you to quickly just run
symfony util:generate-ignores git --add-ignores and it will automatically place the .gitignore file throughout your project in the correct locations and add them into your next commit. You can also just have it place them throughout the project, but not add them to the next commit if you drop the
--add-ignores option. The plugin also accepts “cvs” instead of git for cvs based projects.
The reason you do not want the base, om, etc. directories in your repository is because every time a person rebuilds the model they will be updating those files(many times just changing the timestamp at the top of the autogenerated files), which causes uncessarily large commits.
You can get the plugin via http://www.symfony-project.org/plugins/sfSCMIgnoresTaskPlugin or install it via
symfony plugin:install sfSCMIgnoresTaskPlugin.
If you have any questions/requests shoot us an email.
Posted In: Symfony