Packagist is the main Composerrepository. It aggregates public PHP packages installable with Composer.
Put a file named composer.jsonat the root of your project, containing your project dependencies:
For more information about packages versions usage, see the composer documentation.
Run this in your command line:
curl -sS https://getcomposer.org/installer | php
Or download composer.pharinto your project root.
See the Composer documentation for complete installation instructionson various platforms.
Execute this in your project root.
php composer.phar install
If your packages specify autoloading information, you can autoload all the dependencies by adding this to your code:
Browsethe packages we have to find more great libraries you can use in your project.
Put a file named composer.jsonat the root of your package's repository, containing this information:
"description": "A short description of what your package does",
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 aboutpage.
composer.jsonto your git or other VCS repository and commit it.
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.
Use Private Packagistif 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.
Packagist maintenance and hosting is provided by Private Packagist