При установке yii2 через composer я пару раз столкнулся с такими ошибками:
При первоначальной установке вывалились ошибки когда для bower стали подтягиваться его ассеты
Your requirements could not be resolved to an installable set of packages.
И в другой раз вывалилась такая вот
fatal error : Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\VersionParser::parseLinks()
К сожалению, эта ошибка была где-то в трейсе и я забыл при каких условиях она вывалилась, но путь лечения был таким:
Вначале, особенно при установке, банально проверить что установлен плагин для композера:
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
Это наиболее частая ошибка.
Далее попробовать
composer self-update composer clear-cache
Ну и один раз на ubuntu сервере помогло удаление папки плагина в хоуме – /home/user/.composer/vendor/fxp
тут вместо user – свой юзернейм.
А вообще, может я конечно не “умею готовить” композер, но ошибки какие-то с ним чаще возникали, чем при использовании того же npm
Sometimes, when installing yii2, or updating some libs via composer – a couple errors occurs.
These errors were associated with composer-asset-plugin.
First fail occurred when installing yii2 (and bower try to install own assets):
Your requirements could not be resolved to an installable set of packages.
First step is to check that fxp composer plugin are installed:
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
Second error displays that message:
fatal error : Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\VersionParser::parseLinks()
Unluckily I forgot what caused this error. But I remember, that simple installation of fxp plugin wasn’t helped.
So I try update composer and clear cache:
composer self-update composer clear-cache
But – without result.
And at end I manually delete fxp folder under composer directory:
rm -r /home/user/.composer/vendor/fxp