Uninstalling the class library using composer download update

Source: Internet
Author: User
Tags composer install

Preface: To download what package, you can go to https://packagist.org/find the package name and its version information

1) Configure the Composer.json file, and use the Composer Install command to download the class package, below the Phpmailer class package as an example

{    "require": {        "Phpmailer/phpmailer": "~5.2"    }}
Composer Install

2) do not need to configure the Composer.json file, directly using the composer require command to download the class package (automatically update Composer.json files), the following download Phpexcel as an example:

require Phpexcel/phpexcel

PS: Install command can get help under package name

3) When downloading a dependent package in the 1th mode, if you add a new package, you can use composer update to download the new package (you cannot use the Composer Install command)

{    "require": {        "Phpmailer/phpmailer": "~5.2",        "Phpexcel/phpexcel": "^1.7"    } }
Composer Update

4) If you need to uninstall the package, you can use the composer Remove command, download to uninstall Phpexcel as an example

Composer Remove Phpexcel/phpexcel

PS: There is no need to add a version number after the uninstall command, and the Composer.json file will be updated automatically after uninstallation is completed

Finish.

Uninstalling the class library using composer download update

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.