庆云php

庆云php

composer常用知识及命令tp6安装多应用时 could not find package topthink/think-multi-app

PHP 0
出现的错误: [InvalidArgumentException] Could not find package topthink/think-multi-app. 解决方案: 删除之前的镜像:composer config -g --unset repos.packagist 报错解决,可以正常安装tp6.0框架,TP5有时也生效!
[ComposerDownloaderTransportException] Unable to use a proxy: malformed http_proxy url
require [–dev] [–dry-run] [–prefer-source] [–prefer-dist] [–fixed] [–no-suggest] [–no-progress] [–no-update] [–no-install] [–no-scripts] [–update-no-dev] [-w|–update-with-dependencies] [-W|–update-with-all-dependencies] [–with-dependencies] [–with-all-dependencies] [–ignore-platform-req IGNORE-PLATFORM-REQ] [–ignore-platform-reqs] [–prefer-stable] [–prefer-lowest] [–sort-packages] [-o|–optimize-autoloader] [-a|–classmap-authoritative] [–apcu-autoloader] [–apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [–] []…

网址-could not be fully loaded (Unable to use a proxy: malformed http_proxy url), package information was loaded from the local cache and may be out of date

composer版本查看

composer --version

composer查看全局配置

composer config -l -g

composer升级自身

composer self-update或composer selfupdate

composer版本回退

composer self-update --rollback或composer selfupdate --rollback

全局配置镜像源

$ composer config -g repo.packagist composer https://packagist.laravel-china.org
或
composer config -g repo.packagist composer https://packagist.phpcomposer.com

仅限当前项目使用(相比上边命令去掉了-g)

$ composer config repo.packagist composer https://packagist.laravel-china.org

几个常用镜像源

1、更换成阿里镜像:

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

2、更换成Laravel China镜像:

composer config -g repo.packagist composer https://packagist.laravel-china.org

3、更换成中国全量镜像:

composer config -g repo.packagist composer https://packagist.phpcomposer.com