Results: 17
We can also search for more than one term by passing multiple arguments
composer search keyword1 keyword2
The
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)
Installs the latest
minor
and
patch
versions of the package but
major
will be the specified version
composer require "vendor/package:2.*"
Removes several packages at the same time
composer remove vendor/package vendor/package2
Updates all packages and writes the exact versions into
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)
Creates new project called
projectname
based on
laravel/laravel
package
composer create-project laravel/laravel projectname
Shows available commands that we can execute
composer
The
remove
command removes packages from
vendor
and
composer.json
file
composer remove vendor/package
Installs the latest version of the specified package
composer require phpunit/phpunit
If we want to downgrade a package to a specific version without changing our
composer.json
we can use --with and provide a custom version
composer update --with vendor/package:2.0.1
Results: 17