PHP Composer Dependency Manager


Composer is PHP's most commonly used dependency manager. It's analogous to npm in Node, pip for Python, or NuGet for .NET.


  • php path/to/composer.phar [command] [options] [arguments]


licenseDefines the type of license you want to use in the Project.
authorsDefines the authors of the project, as well as the author details.
supportDefines the support emails, irc channel, and various links.
requireDefines the actual dependencies as well as the package versions.
require-devDefines the packages necessary for developing the project.
suggestDefines the package suggestions, i.e. packages which can help if installed.
autoloadDefines the autoloading policies of the project.
autoload-devDefines the autoloading policies for developing the project.


Autoloading will only work for libraries that specify autoload information. Most libraries do and will adhere to a standard such as PSR-0 or PSR-4.

Helpful Links

Few Suggestions

  1. Disable xdebug when running Composer.
  2. Do not run Composer as root. Packages are not to be trusted.