1

I have a dependency on this module

https://github.com/SocalNick/ScnSocialAuth

However I have to make a change to module in order for it to work but one should never directly change a vendor module.

How can I use the forked and edited module as dependency instead of original module ?

Is it possible using composer ?

Haris Mehmood
  • 854
  • 4
  • 15
  • 26

1 Answers1

0

However I have to make a change to module in order for it to work but one should never directly change a vendor module.

You can fork it to your github account and then add your local copy to your workdir.

How can I use the forked and edited module as dependency instead of original module ? Go to the github repo, click on the fork and it will copy it to your github account.

Now you can add it directly or to use submodule to do it.

Read more about submodules here:
using submodules in git for the timid

Community
  • 1
  • 1
CodeWizard
  • 128,036
  • 21
  • 144
  • 167
  • How to do it using composer ? I want this to be done via composer so that it will resolve all the dependencies (including forked) – Haris Mehmood Mar 21 '16 at 08:59
  • 1
    Read this out: http://stackoverflow.com/questions/13498519/how-to-require-a-fork-with-composer and follow teh instructions – CodeWizard Mar 21 '16 at 09:00
  • if I have have more than 2 modules that require the same thing. Should I just put the repository url one after another? – Haris Mehmood Mar 22 '16 at 06:05
  • can you please look at this http://stackoverflow.com/questions/36147714/use-forked-repo-on-github-via-composer-as-dependency – Haris Mehmood Mar 22 '16 at 06:43