Composer is a package management tool used by many PHP projects. It allows easy inclusion of libraries and dependencies into a project, and most importantly, allows for keeping track of exactly which version/revision of a project you are using in your application.
Setting up a repository on packagist is fairly easy. First we just need to add a composer.json file that would look something like this:
{ "name": "phacility/libphutil", "type": "library", "description": "A collection of utility classes and functions for PHP.", "homepage": "http://secure.phabricator.com/diffusion/PHU", "license": "Apache-2.0" }
Then, after you set up the project on packagist and added a git hook to github, other people can include libphutil in their application (or in Phabricator) by including the following in their composer.json. This also gives them all the advantages of the composer.lock locking the revisions, so that when you deploy your app you always get the same revisions.
"require": { "phacility/libphutil": "dev-master" },
Basically, I'm asking for this: