×
Clear all filters including search bar
Valeri Tandilashvili's Composer Notes
composer search keyword1 keyword2
install
command reads the composer.json
file from the current directory, resolves the dependencies, and installs them into vendor
composer install / composer i
If composer.lock
file exists, installs exactly what's specified in this file
Otherwise
1. Reads composer.json
file to look out what dependencies needs to be installed
2. Writes the composer.lock with the information of the project (installed dependencies)minor
and patch
versions of the package but major
will be the specified versioncomposer require "vendor/package:2.*"
composer remove vendor/package vendor/package2
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)projectname
based on laravel/laravel
packagecomposer create-project laravel/laravel projectname
composer
remove
command removes packages from vendor
and composer.json
filecomposer remove vendor/package
composer require phpunit/phpunit
composer.json
we can use --with and provide a custom versioncomposer update --with vendor/package:2.0.1