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