习惯于使用 Composer 为 Symfony2 安装 composer 不知道的包。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.*"}}