How To Add Public Git Repo As A Composer Package

Allure Web Solutions Code Snippet

If you want to add your own git repo as a composer package you can use the code snippet below. The attributes you will need to replace with your own:

  "repositories": [
    {
      "type":"package",
      "package": {
        "name": "package-name",
        "version":"master",
        "type": "wordpress-plugin",
        "source": {
          "type": "git",
          "url": "https://github.com/package-name.git",
          "reference":"master"
        }
      }
    }
  ],
  "require": {
    "package-name": "dev-master"
  }

 

Mike Doubintchik

Author Mike Doubintchik

More posts by Mike Doubintchik

Leave a Reply