2022-03-10 21:48:55 2115次浏览 5条回答 0 悬赏 10 金钱

整了大半天,yii composer不上,隔壁tp更新飞起.问问大家 yii composer 安装正确使用姿势是啥
yii2 还是web开发大家的首选吗?

补充于 2022-03-10 21:49
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
Creating a "yiisoft/yii2-app-basic" project at "./basic"
Installing yiisoft/yii2-app-basic (2.0.45)
  - Downloading yiisoft/yii2-app-basic (2.0.45)
  - Installing yiisoft/yii2-app-basic (2.0.45): Extracting archive
Created project in D:\web\test_yii2\basic
Loading composer repositories with package information

                                                                   
  [Composer\Downloader\TransportException]                                      
  curl error 28 while downloading https://asset-packagist.org/p/provider-latest/3f8b6244ca39fbcf0674f46a4055dd4ffc720
  967897769294e951cfef45dfb03.json: Operation timed out after 300000 milliseconds with 4759552 out of 8584199 bytes r
  eceived                                                                       
                                                                                

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<version>]
补充于 2022-03-27 13:22

生态决定一切吧,yii2当情怀了~

最佳答案

  • 蓝色主旋律 发布于 2022-03-11 08:31 举报

    没die的时候也是这样。
    其实可以下载zip归档文件,后面的require组件的时候,使用国内镜像源。

  • 回答于 2022-03-18 20:26 举报

    还是用归档文件吧 composer没成功过

  • 回答于 2022-03-22 10:27 举报

    yii2 还是web开发大家的首选,毋庸置疑

  • 回答于 2022-04-01 08:55 举报

    composer 还是好用的 得自己配置下

  • 回答于 2022-04-13 16:06 举报

    composer.json有问题
    以下为可正常安装使用的composer.json内容

    `{

    "type" : "project" ,
    "prefer-stable" : true ,
    "minimum-stability" : "dev" ,
    "require" : {
    	"php" : ">=8.0" ,
    	"bower-asset/bootstrap" : "~3.4.0" ,
    	"bower-asset/jquery" : "~3.6.0" ,
    	"bower-asset/inputmask" : "~3.3.5" ,
    	"bower-asset/punycode" : "~1.3.0" ,
    	"bower-asset/yii2-pjax" : "~2.0.1" ,
    	"yiisoft/yii2" : "~2.0.45" ,
    	"yiisoft/yii2-bootstrap" : "~2.0.0" ,
    	"yiisoft/yii2-swiftmailer" : "~2.0.0 || ~2.1.0" ,
    	"yiisoft/yii2-redis" : "^2.0" ,
    	"yiisoft/yii2-queue" : "dev-master" ,
    	"ext-bcmath" : "*"
    } ,
    "require-dev" : {
    	"yiisoft/yii2-debug" : "~2.1.0" ,
    	"yiisoft/yii2-gii" : "~2.1.0" ,
    	"yiisoft/yii2-faker" : "~2.0.0" ,
    	"codeception/codeception" : "^4.0" ,
    	"codeception/module-asserts" : "^1.0" ,
    	"codeception/module-yii2" : "^1.0" ,
    	"codeception/module-filesystem" : "^1.0" ,
    	"codeception/verify" : "~0.5.0 || ~1.1.0" ,
    	"symfony/browser-kit" : ">=2.7 <=4.2.4"
    } ,
    "config" : {
    	"process-timeout" : 1800 ,
    	"fxp-asset" : {
    		"enabled" : false
    	}
    } ,
    "repositories" : [
    	{
    		"type" : "composer" ,
    		"url" : "https://mirrors.aliyun.com/composer/"
    	} ,
    	{
    		"type" : "composer" ,
    		"url" : "https://asset-packagist.org"
    	}
    ]
    

    }
    `

您需要登录后才可以回答。登录 | 立即注册
linbabay
职场新人

linbabay

注册时间:2019-10-25
最后登录:2022-04-25
在线时长:2小时34分
  • 粉丝1
  • 金钱65
  • 威望0
  • 积分85

热门问题