Currently, My project using version of Yii 2.0.12. But I want to use extension yiisoft/yii-queue
.
When I run command composer require yiisoft/yii-queue
to install this extension, this throw message require to update Yii version to 2.0.14 to use yiisoft/yii-queue
.
So, I run command composer require "yiisoft/yii2:~2.0.14" --update-with-all-dependencies
to update Yii version, but met message of this command is:
Problem 1
- Can only install one of: yiisoft/yii2[2.0.14, dev-master].
- Can only install one of: yiisoft/yii2[2.0.14.1, dev-master].
- Can only install one of: yiisoft/yii2[2.0.14.2, dev-master].
- Can only install one of: yiisoft/yii2[2.0.15, dev-master].
- Can only install one of: yiisoft/yii2[2.0.15.1, dev-master].
- Installation request for yiisoft/yii2 dev-master -> satisfiable by yiisoft/yii2[dev-master].
- Installation request for yiisoft/yii2 ~2.0.14 -> satisfiable by yiisoft/yii2[2.0.14, 2.0.14.1, 2.0.14.2, 2.0.15, 2.0.15.1].
Installation failed, reverting ./composer.json to its original content.
And here is my composer.json
{
"name": "yiisoft/yii2",
"description": "Yii 2 Advanced Project Template",
"keywords": ["yii2", "framework", "advanced", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.6.0",
"yiisoft/yii2": ">=2.0.6",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"yiisoft/yii2-authclient": "*",
"zhelyabuzhsky/yii2-sitemap": "*",
"phpoffice/phpexcel":"*",
"intervention/image": "^2.1",
"facebook/graph-sdk": "^5.7",
"vlucas/phpdotenv": "^3.1",
"trntv/probe": "^1.0",
"philippfrenzel/yii2fullcalendar": "^3.9"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*"
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"scripts": {
"post-install-cmd": "php init --env=Development --overwrite=n"
}
}
Anyone help me to upgrade yii version in this case, I tried to search many times and pages but not have solution for me :(
Thank you so much.
You need to change your project name. According to your composer.json
your project is yiisoft/yii2
, which is not true. I have no idea how did you get this composer.json
, here is the official template - your app structure and composer.json
should look similar (alternatively you may try advanced template). After changing package name, this command should do the trick:
composer require yiisoft/yii2-queue --update-with-all-dependencies