Composer
getcomposer.org
- Free plan
- Windows
- macOS
- Linux
- Self-hosted
What Composer is
Composer is a dependency manager for PHP projects. It installs and updates the libraries a project declares, usually in a directory within that project, and can also manage a global project. It resolves dependencies and supports lockfiles, workspaces, private registry authentication, and offline installation. Packagist is its default package source; custom Composer, version control, and local path repositories are also supported. Composer integrates with Fossil, Git, Mercurial, Perforce, and Subversion. It can be installed locally or as a system-wide executable on Windows, Linux, and macOS. The latest version requires PHP 7.2.5 or later; the 2.2.x LTS line supports PHP 5.3.2 and later and receives critical security fixes through at least 2026-12-31. Composer is free and licensed under MIT. Its audit command checks installed packages for security advisories, abandoned packages, malware flags, and other dependency policies. Plugins and scripts can run with the user's permissions, so Composer advises against running it as root with untrusted packages.
Who it suits
Composer suits PHP developers who need to manage project libraries across supported operating systems. Teams using older PHP versions may consider its 2.2.x LTS line, while taking care with plugins and scripts from untrusted packages.
Good to know, and what to watch
- Resolves dependencies and supports lockfiles.
- Works with private registries and offline installation.
- Supports several version control systems and repository types.
- Audit checks for advisories and other dependency policies.
- Free and released under the MIT license.
- Latest version requires PHP 7.2.5 or later.
- Plugins and scripts can run with the user's permissions.
- Archive decompression relies on separate tools such as unzip or tar.
Plans
Every plan and priceComposer
Free plan
Getting started
- Open getcomposer.org
- Install Composer locally or as a system-wide executable
- On Windows, use the installer to set up PATH
- Verify the installer with its SHA-384 hash before running it
- Run Composer against your PHP project or a mounted Docker project directory
Limits to check
The latest Composer version requires PHP 7.2.5 or later. The 2.2.x LTS line supports PHP 5.3.2 and later and receives critical security fixes through at least 2026-12-31.
The verdict
Composer covers core PHP dependency workflows, from package installation to auditing, with project-local and global installation options. Check the PHP requirements for the version you need and avoid running it as root with untrusted packages.
Questions people ask
How much does Composer cost?
Composer is free. Its listed plan costs nothing, and the project uses the MIT license.
Which operating systems does Composer support?
Composer is designed for Windows, Linux, and macOS, and it is also published as a Docker container.
What PHP versions are supported?
The latest Composer version requires PHP 7.2.5 or later. The 2.2.x LTS line supports PHP 5.3.2 and later.
Does Composer work with private or version-control repositories?
Yes. It supports private registry authentication, custom Composer and local path repositories, and Fossil, Git, Mercurial, Perforce, and Subversion.
What does composer audit check?
The audit command checks installed packages for security advisories, abandoned packages, malware flags, and other dependency policies.
What the maker publishes
- Archive tools
- For decompressing files, Composer relies on tools such as 7z, gzip, tar, unrar, unzip, and xz. source
- Containers
- Composer is published as a Docker container, and its documentation shows how to run install against a mounted project directory. source
- Dependency resolution
- Yes source
- Dependency resolution
- Composer determines which package versions need to be installed and can update all dependencies in one command. source
- Free plan
- Yes source
- Installation options
- Composer can be installed locally in a project or globally as a system wide executable. source
- Installer verification
- The download instructions verify the installer using its SHA-384 hash before running it. source
- Install verification
- The download instructions verify the installer using a SHA-384 hash before running it. source
- License
- Composer and the content on its site are released under the MIT license. source
- Lockfile support
- Yes source
- Offline installation
- Yes source
- Package formats
- PHP packages; ZIP; TAR; VCS repositories source
- Package sources
- Composer uses Packagist by default and supports custom Composer, VCS, and local path repositories. source
- PHP requirement
- The latest Composer version requires PHP 7.2.5 or later. source
- PHP requirements
- The latest Composer version requires PHP 7.2.5; the 2.2.x LTS line supports PHP 5.3.2 and later. source
- Platforms
- Composer says it is multi-platform and aims to run on Windows, Linux, and macOS. source
- Platform support
- Composer says it is designed to run on Windows, Linux, and macOS. source
- Private registry auth
- Yes source
- Project scope
- Composer installs dependencies in a directory within each project by default, and also supports a global project for convenience. source
- Purpose
- Composer is a tool for managing PHP project dependencies, installing and updating the libraries a project declares. source
- Release maintenance
- The 2.10.x release line receives bug and security fixes until the next minor release; the 2.2.x LTS line receives critical security fixes through at least 2026-12-31. source
- Repository integrations
- Composer supports Fossil, Git, Mercurial, Perforce, and Subversion repositories. source
- Security auditing
- The composer audit command checks installed packages for security advisories, abandoned packages, malware flags, and other dependency policies. source
- Security caution
- Composer warns that plugins and scripts can execute with the user's permissions and advises against running it as root for untrusted packages. source
Checked against the maker's pages on 4 Oct 2026.