版权声明:本文为博主原创文章,未经博主允许不得转载。 https://cloud.tencent.com/developer/article/1333698
D:\wamp\www\fastadmin>composer -V
Composer version 1.5.1 2017-08-09 16:07:22
D:\wamp\www\fastadmin>composer -v
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 1.5.1 2017-08-09 16:07:22
...
类似情景:
Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
解决方案:
composer self-update
示例如下:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
提示信息:
The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl ex
tension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true.
解决方案1:取消SSL连接
composer config -g -- disable-tls true
解决方案2:启用OpenSSL
对于Composer 安装目录,如果是 windows系统,可以用 composer config -l -gundefined 找到 home 配置就能看到了 home C:/Users/Administrator/AppData/Roaming/Composer
You are running Composer with SSL/TLS protection disabled.
composer create-project 作者名/项目名 创建ThinkPHP5.0项目 tp5Test
composer create-project topthink/think tp5Pro --prefer-dist
composer create-project laravel/laravel larPro--prefer-dist
composer create-project --prefer-dist laravel/laravel blog "5.3.*"
提示: 要创建不同版本的 laravel 框架,首先要满足 PHP 版本的需求 –prefer-dist 命令是指明创建项目,而非 clone
composer require 作者名/扩展包名
composer require topthink/think-captcha
php artisan --version