We're considering creating our own common
bundle for entity mapping and services for use within few separate apps. A bundle should be easy to modify, run, include and test. I know about Best Practices for Structuring Bundles, but I don't know what git
strategy to use when it comes to development.
Should we create common
bundle as a whole project and commit whole repository to our git server, or is it better to start source control only for root of common
bundle and push only its contents? I see this approach in bundles available on github
, but I don't know easy and comfortable way to develop bundles that way.
Create a new empty symfony project
Generate a new bundle
(for example
src/Company/DemoBundle
)Init your github repository in
src/Company/DemoBundle
Add a composer.json file
src/Company/DemoBundle/composer.json
:Now you have the base structure of your bundle
Use it in another project
composer.json:
Do:
app/AppKernel:
Work on it
src/Company
folder, then manually install itConclusion
You can develop and test your bundle in your first project and use it with github and composer in your second project.