我有 PACK-A 包,其他包需要( PACK-X , PACK-Y , PACK -Z)
我在主项目PROJ-FUN中包含了所有这些包。
这些包( PACK-X , PACK-Y , PACK-Z )需要PACK-版本“~1.0.0”甲
现在我将PACK-A克隆到版本为“0.10.29”的新存储库,现在我尝试在项目中要求PACK-A但是我有以下错误:
问题1
我尝试做以下事情,但徒劳无功:
我的项目JSON:
{
"name": "VENDOR/fun-project",
"description": "VENDOR/FUN APPLICAION",
"license": "proprietary",
"prefer-stable": "true",
"require": {
"VENDOR/PACK-A": "0.10.29 as 1.1.2@dev",
"VENDOR/PACK-X": "^1.1",
"VENDOR/PACK-Y": "^1.1",
"VENDOR/PACK-Z": "^1.1"
},
"config": {
"bin-dir": "bin",
"discard-changes": "true"
},
"repositories": [{
"type": "git",
"url": "git@github.com:VENDOR/PACK-A"
}]
}
PACK-XYZ JSON:
{
"name": "VENDOR / PACK - X",
"description": "",
"type": "symfony-bundle",
"license": "proprietary",
"require": {
"VENDOR / PACK - A": "~1.0.0"
},
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"repositories": [{
"type": "git",
"url": "https://github.com/VENDOR/PACK-A.git"
}]
}
任何人都可以帮忙解决这个问题? 提前谢谢。
**参考文献:**
答案 0 :(得分:1)
显然,你的所有项目
vendor/pack-x
vendor/pack-y
vendor/pack-z
依赖
vendor/pack-a:~1.0.0
此处使用的~
运算符允许在等于或大于vendor/pack-a
且小于1.0.0
的任何版本中安装1.1.0
。
此外,您的项目
vendor/fun-project
需要全部
vendor/pack-x
vendor/pack-y
vendor/pack-z
另外
vendor/pack-a:0.10.29 as 1.1.2@dev
但是,1.1.2@dev
显然与~1.0.0
的早期版本要求相冲突。
尝试将vendor/fun-project
的内联别名调整为:
vendor/pack-a:0.10.29 as 1.0.99
供参考,见: