Use Composer without Packagist

后端 未结 2 466
春和景丽
春和景丽 2020-12-29 13:41

Say for instance you want to use a bundle from someone else, but want to do some modifications. So you do your modifications in some new branch, and configure comspoer.json

相关标签:
2条回答
  • 2020-12-29 14:18

    You should really be using a VCS repository instead of the package repository. Package is for when there is no composer.json and you want to specify it inline instead. In your case there is a composer.json, so you can use the VCS repo, like so:

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/umpirsky/SyliusAssortmentBundle"
        }
    ]
    

    Composer will in this case use the GitHub API to fetch the branch names and check if the version dev-soft-deleteable-products-disabled exists. If it does, it will clone the repository and check out said branch.

    Hopefully if you do this as a side effect your problem will be fixed as well.

    For more information read the docs chapter on repositories.

    0 讨论(0)
  • 2020-12-29 14:35

    Satis can be used as a micro version of Packagist - allowing you to centrally control your Composer dependancies for private repositories.

    Composer Guide to Satis Usage

    0 讨论(0)
提交回复
热议问题