Updated to include require, update and remove (#20269)

Updated the file with composer commands and descriptions of require, update and remove.
This commit is contained in:
Isuru Ranawaka
2018-10-29 04:21:14 +05:30
committed by Christopher McCormack
parent 1918180d69
commit 0ba3c48ee4

View File

@ -18,6 +18,31 @@ Install packages with `composer install`. Composer will install the packages lis
```shell
composer install
```
To install only a specific package, use `composer require <package_name>`. This will only download and install the latest version available to the selected package.
If you run this command without a `composer.json` file, composer will automatically create it the before the installation.
```shell
composer require <package_name>
```
### Updating Packages
Update packages with `composer update`, Composer will automatically download and install the latest versions of the packages listed in the `composer.json` file to the vendor/ folder.
```shell
composer update
```
To update a single package, use `composer update <package_name>`.
### Removing Packages
Removing is easy as installing packages with composer. Just enter `composer remove <package_name>` to uninstall the package from your vendor/ folder. This will automatically update your `composer.json` file.
```shell
composer remove
```
### More Information:
* The Composer website: <a href='https://getcomposer.org/' target='_blank' rel='nofollow'>getcomposer.org</a>