1

I'm developing and intranet application with symfony2. I'm currently using only one fat bundle for all my features. Seem like this is what is recommended and what most symfony2 developpers do.

I wonder how you deal with an growing application where you create entities again and again. Do you just create them in your Entitiy directory inside your bundle? Do you sort them into subdirectories?

The same question can me applied to others classes like the forms.

Any advice on this?

Community
  • 1
  • 1
Francis
  • 163
  • 8

2 Answers2

0

In my opinion, even if best practices say to use a single bundle, for big project this can make you lose time.

In my projects I'm used to create : - one bundle for statics pages and resources : for example PagesBundle - one bundle to the member area : UserBundle - One bundle for the core of the application : ArticlesBundle in the case of a blog, for example.

This serves to separate and save time in the tree Symfony2. Tell me what you think.

0

This is a very subjective topic and mostly relies on what you are most comfortable with. The reason why the best practice now proposes just one big bundle is that the bundle approach was mainly for reusability purposes.

Some people even recommend to store entities outside of any bundle in src\YourNamespace\Entity.

Either way: subdirectories are definitely a very valuable option to sort classes.

jahller
  • 2,705
  • 1
  • 28
  • 30