我正在为框架(atk4/data(开发一个附加组件(ATK4/AUDIT(。我的基本composer.json
看起来像这样:
{
"type": "library",
"name": "atk4/audit",
"require": {
"atk4/data": "^1.3",
"php": ">=5.6.0"
}
}
这可以正常工作,如果使用composer require atk4/audit
,则安装了ATK4/AUDIT [1.0]和ATK4/DATA [1.3]。
尝试使用开发分支:
{
"require": {
"atk4/data": "dev-develop",
"myaddon/addon": "dev-develop"
}
}
作曲家响应错误:
Problem 1
- Installation request for atk4/data dev-develop -> satisfiable by atk4/data[dev-develop].
- atk4/data dev-develop requires atk4/dsql dev-develop -> satisfiable by atk4/dsql[dev-develop] but these conflict with your requirements or minimum-stability.
Problem 2
- Installation request for atk4/audit dev-develop -> satisfiable by atk4/audit[dev-develop].
- atk4/audit dev-develop requires atk4/schema dev-develop -> satisfiable by atk4/schema[dev-develop] but these conflict with your requirements or minimum-stability.
我希望我的库在"稳定"one_answers" dev-develop"版本中都可以使用。我尝试为图书馆设置这样的composer.json
:
{
"type": "library",
"name": "atk4/audit",
"require": {
"atk4/data": "dev-develop,^1.3",
"php": ">=5.6.0"
}
}
但是,这行不通。我在任何地方都没有发现任何问题,我想知道我是否处于错误的道路上?
在与作曲家定义不稳定的依赖时,您需要指定最小稳定性。
{
"require": {
"atk4/data": "dev-develop",
"myaddon/addon": "dev-develop"
},
"minimum-stability": "dev"
}
您还应该添加"prefer-stable": true
,否则composer.json
中的所有非转换软件包都将更新到不稳定的分支。