I have done a few small projects in Symfony 2, they are really simple projects as I am a beginner they have one bundle only and this bundle manages the forms and data access to from 1 to 3 tables. Now someone is interested on one of this bundles and he wants me to develop some other functionality that is going to require some more bundle and they are supposed to use the same database, templates, etc. I have a lot of doubts, but there is one thing that I need to be able to start and is to take the entities and probably some of the forms out of the original bundle let say:
src
|__MyProject
|___MyBundle
|__Entity
|__Form
And I want to have this entities and general forms as and independent folder probably inside MyProject
let say:
src
|__MyProject
|__Entity (General entities)
|__Form (general forms)
|___MyBundle
|__Entity
|__Form
I do not know if this is the correct approach, but I think I need something like this. I have been reading a few docs about best practices and they do something similar (not exactly the same) but every developer has his own book. The question is how do you tell Symfony that the entities are not any more here and they are some where else, I have tried to change the namespaces
paths and the use
statements, but it does not work by doing only that, Symfony is still looking for those entities inside MyBundle
. Can any one assist me some how or point me out to reliable docs?