-2

I just started my new projects in symfony 2 and I'm wondering more than 6000 files in the Symfony directory.

  • is it ok?
  • is it possible to decrease number of files?
1
  • 3
    Why would you worry about the number of files? Forget it and get on with your project.
    – vascowhite
    Mar 9, 2013 at 8:40

2 Answers 2

3

You said you want to do this because you use SVN. Please take a look at this doc article: "How to Create and Store a Symfony2 Project in Subversion". It is a really bad practise to include the files in the vendor namespace in your repository.

Besides that, there is nothing you can do to reduce the amount of files from the core framework. However, you can remove some 3th party bundles/libraries from the Symfony Standard Edition. For instance, if you don't work with Assetic, just remove that bundle and library. The bundles of JMS that are included can be really helpful, but if you don't use them: Just remove them from your composer.json file.

1
  • I done some trial on PHP Composer and I think I got the picture what do You mean. Thanks Wouter. May 20, 2013 at 22:55
1

Having more than 6000 files doesnt really mean that all those code will be executed when you run the application. Most of the files will be in your vendor folder where the third party libraries are placed. It could contain documentation files , tests etc .. which might not be important in production . If you want you can get rid of them but there is no point in doing that. Disc is cheap now a days

3
  • I'm using SVN and the commit and export time are increased a lot. Mar 9, 2013 at 10:05
  • 2
    OMG. Don't keep 3rd party code in your repos. Mar 9, 2013 at 11:30
  • 2
    Well, the vendor folder should not be in your SVN. To distribute all changed vendor files, all you need is the composer.json under version control. When every developer has its own composer.phar, it can download the new versions and added vendor packages with one little console command: "php composer.phar update"
    – bekay
    Mar 9, 2013 at 11:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.