Reputation: 4974
May I change the default Symfony2 structure to fit my needs? I like the follow structure, but don't know how to get it to working..
core/ <- Symfony2 core files
app/ <- All applications
app/Acme/ <- Application for Acme enterprise (with all bundles..)
app/clientone.com/ <- Application for Client One enterprise (with all bundles..)
Upvotes: 1
Views: 2561
Reputation: 1410
Inside symfony2 distribution there are 4 main directories:
So if you have several applications you could keep vendors separately. And each of your application may contain three directories like: - apps/acme/app - apps/acme/src - apps/acme/web - apps/clientone/app - apps/clientone/src - apps/clientone/web - some/where/else/in/filesystem/vendor
To implement such setup is very easy,- all you have to do is edit your autoload.php (which resides in app dir), just replace everywhere __DIR__.'/../vendor
to __DIR__.'/../vendor
,
in other words, tell symfony2 that you moved vendors somewhere else.
(I just renamed app directory in your setup to apps - to be not confused with app directory, inside each of your application)
Upvotes: 3