Packagist is the main Composer repository. It aggregates all sorts of PHP packages that are installable with Composer.
Browse packages or submit your own.

Getting Started

Define Your Dependencies

Put a file named composer.json at the root of your project, containing your project dependencies:

{
    "require": {
        "vendor/package": "1.3.2",
        "vendor/package2": "1.*",
        "vendor/package3": ">=2.0.3"
    }
}

Install Composer In Your Project

Run this in your command line:

curl -s http://getcomposer.org/installer | php

Or download composer.phar into your project root.

Install Dependencies

Execute this in your project root.

php composer.phar install

Autoload Dependencies

If all your packages follow the PSR-0 standard, you can autoload all the dependencies by adding this to your code:

require 'vendor/autoload.php';

Browse the packages we have to find more great libraries you can use in your project.

Publishing Packages

Define Your Package

Put a file named composer.json at the root of your package, containing this information:

{
    "name": "your-vendor-name/package-name",
    "require": {
        "php": ">=5.3.0",
        "another-vendor/package": "1.*"
    }
}

This is the strictly minimal information you have to give.

For more details about package naming and the fields you can use to document your package better, see the about page.

Commit The File

You surely don't need help with that.

Publish It

Login or register on this site, then hit the big fat green button above that says submit.

Once you entered your public repository URL in there, your package will be automatically crawled periodically. You just have to make sure you keep the composer.json file up to date.