Today we will learn about how we can use github as package source in composer. Composer is a package manager for PHP, all packages that composer have are mostly manged from packagist. We can also use github as package source for composer. Below is the format how we can define a package which source code is available in github to be available to loaded as a composer package.
You need to add have above code snippet in your composer.json file and you can update url (git repo url), reference (git branch) & version (reference version), according to your project.
Once user will run composer install command, it will fetch the package source code in vendor/package-name from reference (git branch) specified in composer.json file.