Page MenuHomePhabricator

Make arcanist and libphutil composer ready by adding composer.json
Closed, DuplicatePublic

Description

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:

libphutil composer.json
{
    "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:

  1. Add a composer.json to rARC and rPHU
  2. Register them on packagist (takes 2 minutes)
  3. Set up a git hook to keep packagist up to date (otherwise, it crawls it once a day, which wouldn't be horrible)

Event Timeline

bluehawk raised the priority of this task from to Needs Triage.
bluehawk updated the task description. (Show Details)
bluehawk added a subscriber: bluehawk.

✘ Merged into T4200.