Composer Generating PHP dependency packages

Source: Internet
Author: User
Tags autoload composer install

In the near future, when using some extensions or libraries, occasionally you will encounter the problem of using composer to generate PHP packages.
The summary steps are as follows:
Install composer under window: reference
Http://www.kankanews.com/ICkengine/archives/28197.shtml

Download:

Windows environment

Composer is recommended to use the installation package for installation, it is said to download Composer-setup.exe This can be installed in Wizard mode.

When the installation is complete, use the command line to navigate to the directory where you want to generate the code.
Create a Composer.json file in the directory. The format is:

{"require": {"guzzlehttp/guzzle": "~5.0","Guzzlehttp/guzzle": "~5.0",}}

Generate the code using the cmd Composer command:
E:\dannycode\composer>composer Install
will produce the following results:
Loading Composer repositories with the package information
Installing dependencies (including Require-dev)
-Installing React/promise (v2.0.0)
Loading from Cache

-Installing Guzzlehttp/streams (3.0.0)
Loading from Cache

-Installing guzzlehttp/ringphp (1.0.0)
Loading from Cache

-Installing Guzzlehttp/guzzle (5.0.0)
Loading from Cache

Writing Lock File
Generating autoload files

The build succeeded.

PS If prompted:
Warning:this development build of composer is over. It is recommended to update it by running ' C:\ProgramData\ComposerSetup\bin\composer.phar self-update ' to get the latest V Ersion.

You need to update composer:
E:\dannycode\logtest>composer Update
Loading Composer repositories with the package information
Updating dependencies (including Require-dev)
-Installing React/promise (v2.0.0)
downloading:100%

-Installing Guzzlehttp/streams (3.0.0)
downloading:100%

-Installing guzzlehttp/ringphp (1.0.0)
downloading:100%

-Installing Guzzlehttp/guzzle (5.0.0)
downloading:100%

Writing Lock File
Generating autoload files

Reference website:

Http://www.kankanews.com/ICkengine/archives/28197.shtml

http://blog.lixiphp.com/php-composer-install-and-use/#axzz3BglEg0J6

https://packagist.org/

Composer Generating PHP dependency packages

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.