简体   繁体   中英

How to develop an external reusable Symfony 3 Bundle

I'd like to develop a reusable external Symfony 3 bundle installable with composer. I understood how to use composer to install a "private" vendor through a personal git repository, but I can't figure it out how to setup the environment for the development of the library/bundle.

Should I create an empty Symfony project to reproduce the environment and developing my library/bundle with only it under git versioning? 'Couse it doesn't sound like a good idea to me. Or should I develop the library/bundle as it is and relay only on Unit Testing? Or, worse, should I develop the library/bundle, pushing to the develop branch and pulling it in my current project under develop?

I think that I'm too far way from the right answer. Please, show me the right way. Thanks.

创建捆绑包,坚持要您进行工程,一旦完成...用捆绑包创建新的存储库在packagist.org上打包捆绑包仓库现在,您可以通过composee安装捆绑包

just create your bundle, initially, inside a symfony project, when you have an initial version up and running, put it in a seperate repo, and add to packagist.

now pull the package into your symfony project using composer, and remove the original from your src folder.

at this point you can just use the git repo, pulled in by composer, to make changes in, and push changes upstream (just work with git inside your vendors/your-bundle/ folder)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM