composer.lock
composer update
1. The composer.lock file will be ignored
2. composer.json
file dependencies will be installed and updated (if a dependency is not installed it will be downloaded)composer update vendor/package
composer update "vendor/*"
composer.json
we can use --with and provide a custom versioncomposer update --with vendor/package:2.0.1
composer require phpunit/phpunit
minor
and patch
versions of the package but major
will be the specified versioncomposer require "vendor/package:2.*"
remove
command removes packages from vendor
and composer.json
filecomposer remove vendor/package
composer remove vendor/package vendor/package2
composer
projectname
based on laravel/laravel
packagecomposer create-project laravel/laravel projectname