gpt4 book ai didi

yii - 特拉维斯.ci : "composer requirements could not be resolved" but everything works locally (Yii2)

转载 作者:行者123 更新时间:2023-12-04 19:37:26 25 4
gpt4 key购买 nike

我正在为 Yii2 框架构建一个包。

在本地一切正常:测试是绿色的,composer 安装/更新依赖项没有问题(我已经在几台具有不同开发环境的机器上尝试过,完全没有问题)。

但是当 travis-ci 尝试构建我的项目时,相同的 composer 命令返回错误:“您的要求无法解析为一组可安装的包”。

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.

这是我的 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"
},

让我重复一遍:这在本地有效,甚至其他人也尝试克隆我的存储库,一切正常。

你可以自己试试:https://github.com/mobileka/scope-applicator-yii2

git clone git@github.com:mobileka/scope-applicator-yii2.git && cd scope-applicator-yii2 && composer install.

有没有其他人遇到过这个问题,有解决方案吗?

谢谢。

最佳答案

问题通过修改.travis.yml文件解决:

before_script:
- composer self-update
- composer global require "fxp/composer-asset-plugin:~1.0.0"
- composer install --prefer-source --no-interaction

它缺少全局要求 "fxp/composer-asset-plugin:~1.0.0"

关于yii - 特拉维斯.ci : "composer requirements could not be resolved" but everything works locally (Yii2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31219047/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com