Use forked repo on github via composer as dependency

后端 未结 1 1498
甜味超标
甜味超标 2021-01-24 08:52

I have a project that uses socalnick/scn-social-auth-doctrine-orm. This module further depends upon:

  1. socialnick/scn-social-au
1条回答
  •  走了就别回头了
    2021-01-24 09:11

    You should override that dependencies in your composer.json.

    {
        "require": {
            "socalnick/scn-social-auth-doctrine-orm": "*",
            "socialnick/scn-social-auth": "*",
            "hybridauth/hybridauth": "*"
        },
        "repositories": [
            {
                "type": "git",
                "url": "https://github.com/USER/scn-social-auth.git"
            },
            {
                "type": "git",
                "url": "https://github.com/USER/hybridauth.git"
            }
        ]
    }
    

    In your fork you could add a tag that matches the requirements of the main package, or use a branch with a version number alias:

    "socialnick/scn-social-auth": "dev-mybranch as 2.1.0",
    

    Reference blog post from mnapoli

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