title | category | layout | weight | authors | updated | description | |||
---|---|---|---|---|---|---|---|---|---|
composer |
CLI |
2017/sheet |
-1 |
|
2018-03-06 |
Basic guide on how to use Composer, the PHP Package manager.
|
All composer commands, depending on your install, may need to use php composer.phar
in the install folder for composer, instead of plain composer
.
Command | Description |
---|---|
composer install |
Install everything in composer.json |
--- | --- |
composer install laravel |
Install a package |
composer install laravel --dry-run |
Simulates the install without installing anything |
composer install laravel --no-scripts |
Skips post-download scripts |
Command | Description |
---|---|
composer update |
Update all packages |
--- | --- |
composer update laravel |
Update a certain package |
composer update vendor/* |
Update all packages in a folder |
composer update --lock |
Update lock file hash without updating any packages |
Command | Description |
---|---|
composer require laravel . |
Add new package to composer.json and install it |
--- | --- |
composer require laravel --dev |
Add new package to require-dev and install it. |
Command | Description |
---|---|
composer remove laravel |
Remove new package from composer.json and uninstall it |