习惯使用Composer为Symfony2安装composer unaware软件包。 Twitter / Bootstrap的配置是:
"repositories": [
{
"type": "package",
"package": {
"name": "twitter/bootstrap",
"version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/twitter/bootstrap",
"reference": "v2.3.0"
}
}
}
],
但是有了Jasny / Bootstrap这个
{
"type": "package",
"package": {
"name": "jasny/bootstrap",
"version": "2.3.0-j4",
"source": {
"type": "git",
"url": "https://github.com/jasny/bootstrap",
"reference": "2.3.0-j4"
}
}
}
失败了
[UnexpectedValueException]
Could not parse version constraint 2.3.0-j4: Invalid version string "2.3.0-j4"
如何解决? 2.3.0-j4是最新版本。 “-j4”只是非标准和破坏作曲家吗?
不幸的是,根据建议尝试2.3。*和> = 2.3会导致类似的错误。
[Composer\Repository\InvalidRepositoryException]
A repository of type "package" contains an invalid package definition: Undefined index: version
Invalid package definition:
{"name":"jasny\/bootstrap","version":"2.3.*","source":{"type":"git","url":"https:\/\/github.com\/jasny\/bootstrap","reference":"2.3.*"}}
答案 0 :(得分:1)
版本必须遵循X.Y.Z
的格式,后缀为-dev
,-alphaN
,-betaN
或-RCN
。
您可以尝试2.3.*
或>=2.3
。