Home >Development Tools >composer >Record the cheating process used by composer under Linux

Record the cheating process used by composer under Linux

藏色散人
藏色散人forward
2020-04-21 16:05:532209browse

Record the cheating process used by composer under Linux

For composer, I have been using it under windows before, and there is no big problem. Today, it is in my computer virtual machine I made a lnmp and want to install yii2.

1. First upgrade composer self-update to the latest one.

2. Install the Composer Asset Plugin, go to github and find the method composer global require "fxp/composer-asset-plugin:~1.3", and after doing it several times, I get this error

Problem 1
    - The requested package fxp/composer-asset-plugin ~1.3 is satisfiable by fxp/composer-asset-plugin[1.3.x-dev] but these conflict with your requirements or minimum-stability.

Later, I went online to find a way. Most of them said to add "minimum-stability": "dev" in composer.json, but it didn't work. I tried many methods over and over again, and finally tried to change the downloaded version to 1.2.2 based on the original one. , that’s it. The answer from netizens is not omnipotent. The commands given by github are a bit cheating.

3.composer create-project yiisoft/yii2-app-basic yii2 2.0.11

4.composer update

5.Token generated by github: github avatar->setting->Personal access tokens->Generate new token

6. Downloading. . . Previously, I used the composer config repo.packagist composer https://packagist.phpcomposer.com command to change the global download address of the image to a domestic one, but it was still extremely slow. Composer config -l -g checked that it was indeed changed [repositories .packagist.org.url] https://packagist.phpcomposer.com. . . .

7. The installation is completed.

The above is the detailed content of Record the cheating process used by composer under Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete