How to use Composer packages directly from GitHub (or other VCS)

Today Nelmio packages were unavailable via Composer due to a human error. This is an inconvenience that may happen again intentionally or unintentionally. Luckily Composer allows the use of custom VCS repositories that you can easily use to bridge the gap when Nelmio Packages are unavailable.

If you are using a certain library for your project and you decide to change something in the library, you will want your project to use the patched version. If the library is on GitHub (this is the case most of the time), you can simply fork it there and push your changes to your fork.

Define the repositories in your composer.json like this to override existing composer package sources with your backup or bug fix release: