Composer A Dependency Manager for PHP Authors: Nils Adermann, Jordi Boggiano and many community contributions Sponsored by: Logo by: Max Grigorian Composer and all content on this site are released under the MIT license MIT license
Download - Composer Download Composer Latest: v2 8 9 To quickly install Composer in the current directory, run the following script in your terminal To automate the installation, use the guide on installing Composer programmatically
Introduction - Composer Composer is a tool for dependency management in PHP It allows you to declare the libraries your project depends on and it will manage (install update) them for you Dependency management# Composer is not a package manager in the same sense as Yum or Apt are
Basic usage - Composer How does Composer download the right files? When you specify a dependency in composer json, Composer first takes the name of the package that you have requested and searches for it in any repositories that you have registered using the repositories key
Repositories - Composer A repository is a package source It's a list of packages versions Composer will look in all your repositories to find the packages your project requires By default, only the Packagist org repository is registered in Composer You can add more repositories to your project by declaring them in composer json
Composer If you need to work with composer as a library you may also want to check out the source Composer and all content on this site are released under the MIT license
Command-line interface Commands - Composer To get help from the command-line, call composer or composer list to see the complete list of commands, then --help combined with any of those can give you more information As Composer uses symfony console you can call commands by short name if it's not ambiguous
Libraries - Composer This chapter will tell you how to make your library installable through Composer Every project is a package# As soon as you have a composer json in a directory, that directory is a package When you add a require to a project, you are making a package that depends on other packages The only difference between your project and a library is
Authentication for privately hosted packages and repositories - Composer Whenever Composer encounters a protected Composer repository it will try to authenticate using already defined credentials first When none of those credentials apply it will prompt for credentials and save them (or a token if Composer is able to retrieve one)