[英]yii2 widgets are not installing via composer
Can't able to install widget using composer for yii2 framework无法使用 yii2 框架的 composer 安装小部件
My composer look like this:我的作曲家看起来像这样:
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.6",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.0.0",
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/base": "^2.2.3",
"codeception/verify": "~0.3.1"
},
You need to change your constraint in the composer.json
to the following您需要将
composer.json
中的约束更改为以下内容
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.6",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.0.0",
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/base": "^2.2.3",
"codeception/verify": "~0.3.1"
},
As according to the DOCS
根据
DOCS
Note:
Version 2.1
of this extensions usesSwiftmailer 6
, which requiresPHP 7
.注意:此扩展的
Version 2.1
使用Swiftmailer 6
,它需要PHP 7
。 If you are usingPHP 5
, you have to useversion 2.0
of this extension, which usesSwiftmailer 5
, which is compatible withPHP 5.4
and higher.如果您使用的是
PHP 5
,则必须使用此扩展的version 2.0
,它使用与PHP 5.4
及更高版本兼容的Swiftmailer 5
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.