Composer require branch name

后端 未结 2 879
既然无缘
既然无缘 2020-12-04 14:48

For example I want to require:

{
  \"repositories\": [
    {
      \"type\": \"git\",
      \"url\": \"https://github.com/google/google-api-php-client.git\"
         


        
相关标签:
2条回答
  • 2020-12-04 15:21

    this will work :

    {
      "repositories": [
        {
          "type": "git",
          "url": "https://github.com/google/google-api-php-client.git"
        }
      ],
    
      "require": {
        "google/apiclient": "dev-BRANCH_NAME"
      }
    }
    

    so pattern is "dev-*", if you branch name is "bug-fix" then "dev-bug-fix"

    with command line :

    composer require google/apiclient:dev-BRANCH_NAME
    
    0 讨论(0)
  • 2020-12-04 15:25

    You need to prefix all dev branches (= non tagged) by dev-.

    To install the branch you need, use:

    composer require google/apiclient:dev-v1-master
    

    See composer docs.

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