Command Palette

Search for a command to run...

Page Inspect

https://packagist.org/
Internal Links
12
External Links
13
Images
5
Headings
12

Page Content

Title:Packagist
Description:The PHP Package Repository
HTML Size:14 KB
Markdown Size:3 KB
Fetched At:November 18, 2025

Page Structure

h1Packagist The PHP Package Repository
h2Getting Started
h3Define Your Dependencies
h3Install Composer In Your Project
h3Install Dependencies
h3Autoload Dependencies
h2Publishing Packages
h3Define Your Package
h3Validate The File
h3Commit The File
h3Publish It
h3Sharing Private Code

Markdown Content

Packagist

Toggle navigation# Packagist *The PHP Package Repository*

- Browse
- Submit
- Create account
- Sign in

Remember me

Use Github Log in

No account yet? Create one now!

Packagist is the main Composer repository. It aggregates public PHP packages installable with Composer.

Search by

## 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"
}
}

For more information about packages versions usage, see the composer documentation.

### Install Composer In Your Project

Run this in your command line:

curl -sS https://getcomposer.org/installer | php

Or download composer.phar into your project root.

See the Composer documentation for complete installation instructions on various platforms.

### Install Dependencies

Execute this in your project root.

php composer.phar install

### Autoload Dependencies

If your packages specify autoloading information, 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's repository, containing this information:

{
"name": "your-vendor-name/package-name",
"description": "A short description of what your package does",
"require": {
"php": ">=8.2",
"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.

### Validate The File

Run `composer validate` to check that your file has no syntax errors.

### Commit The File

Add the `composer.json` to your git or other VCS repository and commit it.

### Publish It

Log in or register on this site, then hit the submit button in the menu.

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.

### Sharing Private Code

Use Private Packagist if you want to share private code as a Composer package with colleagues or customers without publishing it for everyone on Packagist.org. Private Packagist allows you to manage your own private Composer repository with per-user authentication, team management and integration in version control systems.

-
-
-

- About Packagist
- Atom/RSS Feeds

- Statistics
- Browse Packages

- API
- Mirrors

- Status
- Dashboard

Maintenance and hosting provided by

Bandwidth and CDN provided by

Monitoring provided by

Sponsor Packagist.org & Composer