How to update Yii2 from 2.01 to 2.03 via composer, please?
And what to check current version? Actually I look to /project/vendor/yiisoft/yii2/CHANGELOG.md, but is it the right way, or is there a better way?
How to update Yii2 from 2.01 to 2.03 via composer, please?
And what to check current version? Actually I look to /project/vendor/yiisoft/yii2/CHANGELOG.md, but is it the right way, or is there a better way?
composer update
or if you don’t have shortcuts setup, php composer.phar update
If you experience problems after the upgrade, you probably need to perform 3 operations:
delete the ‘vendor’ directory.
run composer clear-cache
3 run composer update
Only if the above fails, of course.
ooops… and now?
[Composer\DependencyResolver\SolverProblemsException]
Problem 1
- yiisoft/yii2 dev-master requires bower-asset/jquery.inputmask 3.1.* -> no matching package found.
- yiisoft/yii2 2.0.x-dev requires bower-asset/jquery.inputmask 3.1.* -> no matching package found.
- Installation request for yiisoft/yii2 * -> satisfiable by yiisoft/yii2[2.0.x-dev, dev-master].
Potential causes:
A typo in the package name
The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Do what I told you to do.
I believe that should fix it.
I deleted the ‘vendor’ directory, launched composer clear-cache and composer update, but still the same problem.
Before this I launched composer self-update. Can this be a problem?
Shouldn’t be a problem.
You have a strange issue.
<edit>
Oh, right.
I see that you are using Yii2 dev-master.
You probably shouldn’t.
Did you install Yii2 with the --prefer-dist option?
If your composer.json look at bit like this:
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
and have this setting:
"minimum-stability": "stable",
then it should work.
I had a mis-match glitch when I upgraded, but a cache clean and a delete of the ‘vendor’ and a composer update fixed my problems.
Check your composer.json.
This is my composer.json:
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Application Template",
"keywords": ["yii2", "framework", "basic", "application 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": "dev",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"amnah/yii2-user": "dev-master",
"codeexpert/yii2-firephp": "0.1.*@dev"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*",
"amnah/yii2-user": "dev-master",
"codeexpert/yii2-firephp": "0.1.*@dev"
},
"config": {
"process-timeout": 1800
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\Installer::postCreateProject"
]
},
"extra": {
"yii\\composer\\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"yii": "0755"
}
],
"generateCookieValidationKey": [
"config/web.php"
]
},
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
And, if can be useful, the error occur when Installing yiisoft/yii2-faker (or immediatly after)
(And many thank you for your kindly assistance)
Set minimum-stability to ‘stable’.
That’s the only thing that springs to my eye…
I launched (found somewere)
composer global require "fxp/composer-asset-plugin:1.0.*@dev" -vvv
before
composer update -vvv
And it worked!
Thank you again ( and I hope all the things will work, now )
End yes, I changed the minimum-stability to ‘stable’ too.