Answer the question
In order to leave comments, you need to log in
How to install yii 2.0.1 via composer?
Hey!
Can't install yii2 via composer.
If you write "yiisoft/yii2": "*", then everything is set except for the framework itself... if you directly specify the version, then it swears that the package was not found....
composer require --prefer-dist "yiisoft/yii2 2.0.1"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package yiisoft/yii2 1.0.0 could not be found.
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.
Installation failed, reverting ./composer.json to its original content.
{
"name": "yiisoft/yii2",
"description": "Yii PHP Framework Version 2",
"keywords": ["yii2", "framework"],
"homepage": "http://www.yiiframework.com/",
"type": "library",
"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.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-swiftmailer": "*",
"yiisoft/yii2-redis": "*",
"yiisoft/yii2-composer": "*",
"yiisoft/yii2-bootstrap": "@stable",
"yiisoft/yii2-jui": "@stable",
"cebe/markdown": "~1.0.0",
"ezyang/htmlpurifier": "4.6.*",
"bower-asset/jquery": "@stable",
"bower-asset/jquery-ui": "@stable",
"bower-asset/jquery.inputmask": "@stable",
"bower-asset/typeahead.js": "0.10.*",
"bower-asset/punycode": "@stable",
"bower-asset/bootstrap": "@stable",
"bower-asset/yii2-pjax": "@stable"
},
"require-dev": {
"yiisoft/yii2-debug": "*"
},
"config": {
"process-timeout": 1800
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
Answer the question
In order to leave comments, you need to log in
the problem was solved by removing these lines from composer.json, which were copied from yii2-app-basic and everything was installed!
"name": "yiisoft/yii2",
"description": "Yii PHP Framework Version 2",
"keywords": ["yii2", "framework"],
"homepage": "http://www.yiiframework.com/",
"type": "library",
"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",
This garbage must be set
php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta4"
then yiisoft/yii2
In general, I still don't understand the logic of the developers, I install the PHP framework, and he tells me on JQUERY swears.
They helped me recently. Maybe this will help you - How to install yii 2 on openserver?
Hello.
Composer clearly told you, look at https://groups.google.com/d/topic/composer-dev/_g3... here it was necessary to install in composer.json
And he also said to look at getcomposer.org/doc/articles/troubleshooting .md
to solve further common problems.
The documentation on the composer site is in English, but you can translate via google translator.
Install failed, reverting ./composer.json to original content.
Something was not installed correctly, or one composer was installed on top of another, no one reads that openserver already has composer and then:
I mean
, they write tips for you, read them, so I solved my problems with composer how everything is arranged, so I learned how to install widgets from github manually)) So of course it's better not to do it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question