I wish to make my module available in github repository and then i wish to install it to my local using composer.json. How is this possible? Please provide me a solution, to install my module using composer.json ?
-
Hello @Jaisa, Mitchum solution worked ? – Pawan Feb 15 '19 at 17:36
You can easily host your code to github You need to have a valid composer.json on your module repo. After you just have to add your repository into your magento composer.json like
"repositories": [
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo" }
]
and you can make a composer require my-module
that's it.
But if you got several modules, think about packagist or Satis instance to handle it easily.
-
Am i need to add it in the composer.json which is in my magento root folder – Jaisa Feb 18 '19 at 5:32
-
yes for sure This is an example on what can be done : gist.github.com/julienanquetil/4277cd665f8d95e877205d0119f6dc59 there is 2 composer sample, one from your module, one from magento. – Mitchum Feb 18 '19 at 7:53
-
-
If i have two repositories with different modules, But one of that, need another module, how do i add it and how to make it to be installable via composer – Jaisa Feb 28 '19 at 6:09
-