Composer
Dependency manager for PHP projects. Install, update, and autoload packages with version constraints and lock files.
54 commands
Browse by Topic
Install Composer (macOS)
Install PHP Composer using Homebrew on macOS
Check Composer version
Display the installed Composer version
Initialize a new project
Interactively create a new composer.json for your project
Install dependencies
Install from composer.lock.
Install production only
Install without dev dependencies.
Install prefer dist
Prefer zip downloads over git clones.
Install prefer source
Prefer git clones for development.
Install optimized
Production install with optimized autoloader.
Install no plugins
Install without running plugins.
Install no scripts
Install without running scripts.
Install dry run
Simulate install without changes.
Require package
Add and install a package.
Require dev package
Add development dependency.
Require with version
Require with version constraint.
Require exact version
Require an exact package version.
Global require
Install a package globally.
Remove package
Remove a package and its deps.
Require with prefer stable
Prefer stable releases when adding.
Update all packages
Update all dependencies.
Update specific package
Update single package.
Show outdated
List outdated packages.
Update with dry run
Preview updates without applying.
Update with dependencies
Update package and its dependencies.
Update lock file only
Re-resolve and update only composer.lock.
Check platform reqs
Check PHP and extension requirements.
Show package info
Show details for an installed package.
Show all installed
List all installed packages.
Why is package installed
Show why a package is depended upon.
Why not a version
Show why a version cannot be installed.
Outdated direct only
Show outdated direct dependencies only.
Run script
Run a defined script.
List scripts
List available scripts.
Run script shorthand
Run script (shorthand).
Execute binary
Run a vendor binary via exec.
Run with timeout
Run script with custom timeout.
Dump autoload
Regenerate autoload files.
Optimized autoload
Generate optimized classmap.
Classmap authoritative
Only load from classmap.
Install optimized
Install with optimized autoloader.
APCu autoload cache
Use APCu to cache found/not-found classes.
No dev autoload
Rebuild autoloader without dev packages.
Create project
Create a new project from a template.
Init new project
Create a new composer.json interactively.
Validate composer.json
Validate composer.json for publishing.
Archive package
Create a distributable zip archive.
Config repository
Add a private VCS repository.
Search packages
Search Packagist for packages.
Diagnose issues
Check for common setup issues.
Show licenses
List licenses of installed packages.
Fund maintainers
Show funding links for dependencies.
Show suggests
Show suggested packages.
Global update
Update all globally installed packages.
Clear cache
Clear the internal package cache.
Self update
Update Composer itself to latest.
Discussion
Loading comments...