1

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

  1. socialnick/scn-social-auth

Which further depends upon

  1. hybridauth/hybridauth

So ORM Depends on->Social-Auth which depends on->Hybrid

In order for my application to work, I required some changes in these two modules (1) and (2). I forked these modules to my git account and made changes as per my requirement. In my application composer.json I am just putting socalnick/scn-social-auth-doctrine-orm as requirement.

How can I manage composer.json so that socalnick/scn-social-auth-doctrine-orm get my forked modules instead of default modules.

1 Answer 1

1

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

1
  • Thanks and for others this mnapoli blog post is really helpful, Mar 23, 2016 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.