2017-03-06 11:10
浏览 233


We have a PHP package which is installed via composer. The master branch of this project is currently at v0.x.x. We are already using this package on some of our projects, and the composer.json on these projects knows to only look for 0.. releases.

We are looking to bring the package up to date with the latest version of Laravel, and add some new features. This would then be tagged as v1.x. v0.x releases would move to a support branch.

Will composer intelligently pull from the correct branch if 0.. releases move to a support branch, or do we have to reconfigure it somewhere to tell it which branch to use?

图片转代码服务由CSDN问答提供 功能建议

我们有一个通过composer安装的PHP包。 该项目的主分支目前位于v0.x.x. 我们已经在我们的一些项目中使用了这个包,而这些项目中的composer.json知道只查找0. 版本。

我们是 希望使用最新版本的Laravel更新软件包,并添加一些新功能。 然后将其标记为v1.x. v0.x版本将转移到支持分支。

如果0. 版本移动到支持分支,或者做的话,编辑将智能地从正确的分支拉出 我们必须在某处重新配置它以告诉它使用哪个分支?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douhao2026
    douhao2026 2017-03-06 22:26

    Composer goes for the tags. Branches are irrelevant (unless you are pulling a "dev-branch" instead of a version).

    Note that you'd only need to establish a support branch if there really is the need for more support. This can be done when the demand is there, because you'd be able to create a branch on an existing tag.

    点赞 评论