Search code examples
symfonybundlevendor

Symfony2 bundle on multiple corporate websites best practices


I'm working on a project ... creating a bundle which is gonna be use in multiple instances of sf2. And I wonder what is the best practice about it ? Let it go in src/ or in vendor/ and have it on our git server ? I've tried without success to create one in vendor but I always have error like it cannot be registered.

What is the best practice about that ? and if it's vendor dir ... do you know anyplace where I can find guidelines about setting it up properly?


Solution

  • The best practice answer is to use 'composer.json', '/vendors' and the symfony documentation to create a working bundle stored in version control. Based on what you said, it seems like you're very close. Then override the bundle via '/src' for minor bundle tweaks on each of the multiple apps which run the bundle. This will keep everything clean and manageable.