Travis.ci: "Composer requirements could not be resolved" but everything works locally (Yii2)
I am creating a package for Yii2 Framework.
Locally everything works fine: tests are green, the linker installs / updates dependencies without problems (I've tried on multiple machines with different development environments and no problem at all).
But when travis-ci tries to build my project, the same compiler command returns an error: "Your requirements cannot be resolved to the set of packages being installed."
Problem 1
- yiisoft/yii2 2.0.4 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.3 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.2 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.1 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.0 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- Installation request for yiisoft/yii2 2.0.* -> satisfiable by yiisoft/yii2[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4].
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.
Here are my requirements composer.json
:
"require": {
"php": ">=5.4.0",
"mobileka/scope-applicator": "1.0.*",
"yiisoft/yii2": "2.0.*"
},
"require-dev": {
"phpunit/phpunit": "4.1.*",
"mockery/mockery": "0.9.3",
"satooshi/php-coveralls": "0.6.1"
},
Let me repeat: this works locally, and even other people have tried to clone my repository and everything works fine.
You can try: https://github.com/mobileka/scope-applicator-yii2
git clone git@github.com:mobileka/scope-applicator-yii2.git && cd scope-applicator-yii2 && composer install
...
Has anyone else encountered this problem and is there a solution?
Thank.
source to share
The problem was solved by modifying the file .travis.yml
:
before_script:
- composer self-update
- composer global require "fxp/composer-asset-plugin:~1.0.0"
- composer install --prefer-source --no-interaction
There was no global requirement in it "fxp/composer-asset-plugin:~1.0.0"
.
source to share