Is there a standard skeleton, or instructions, for setting up an open-sourced Symfony2 bundle complete with travis-ci and composer? [closed]

眉间皱痕 提交于 2019-12-22 08:40:10

问题


If there are, then they must be very well hidden...I've tried googling, traversing the maze of Symfony docs, asking on twitter and searching here but have found nothing useful.

Stumbling block 1: Where to create my bundle, designed to be open-sourced?

If I want my bundle to be it's own project on github, with instructions for people to add it to their deps list so that it ends up in their vendor/bundles directory, should I create the bundle within vendor/bundles/ initially? Should I make the bundle in a fresh Symfony2 setup, which isn't version controlled, then only run "git init" within the bundle that I want to share? (This is what I did). I'm surprised there's no best practice guide for this.

Stumbling block 2: What/where should my test bootstrap be?

Again, I couldn't find any best practice for this, so I ended up looking at several existing bundles on github that have travis-ci integration and seeing if there was a consistent way of providing a boostrap. But there doesn't seem to be (from the ones I've seen at least). I've cobbled together bits and pieces of what I found in desparation but without much luck so far. The test suite runs locally because my (gitignored) phpunit.xml specifies the path to the Symfony src, but it doesn't seem clear how to autoload for a travis build.

You can see my bundle setup here.

And my, rather pitiful, travis builds here.

I'd really appreciate a push in the right direction here. Thanks.

来源:https://stackoverflow.com/questions/9070228/is-there-a-standard-skeleton-or-instructions-for-setting-up-an-open-sourced-sy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!