我在配置satisf或composer时遇到了问题。到目前为止我做了什么:
1:我创建了一个名为“common”的SVN存储库。有几个标签(1.0,1.1) - 每个标签都有自己的composer.json文件,例如:
{
"name": "acme/common",
"version": "1.0"
}
SVN网址:http://svn.local.acme.com/svn/common
2:我从satisf.json创建了composer存储库:
{
"name": "Acme",
"homepage": "http://dev.local.acme.com/satis/web",
"repositories": [
{ "type": "vcs", "url": "http://svn.local.acme.com/svn/common" }
],
"require-all": true
}
它确实将所有标签拉入web / packages.json:
{
"packages": {
"acme/common": {
"1.0": {
"name": "acme/common",
"version": "1.0",
"version_normalized": "1.0.0.0",
"source": {
"type": "svn",
"url": "http://svn.local.acme.com/svn/common",
"reference": "/tags/1.0/@2"
},
"type": "library"
},
"1.1": {
"name": "acme/common",
"version": "1.1",
"version_normalized": "1.1.0.0",
"source": {
"type": "svn",
"url": "http://svn.local.acme.com/svn/common",
"reference": "/tags/1.1/@5"
},
"type": "library"
}
}
}
}
Satis网址:http://dev.local.acme.com/satis/web
3:在我的项目中,我想在我的composer.json中要求“acme / common”(比方说1.0):
{
"require": {
"acme/common": "1.0"
},
"repositories": [
{
"type": "composer",
"url": "http://dev.local.acme.com/satis/web"
}
]
}
它成功拉出1.0标签,但是如果我将需要更改为“1.1”并运行composer.phar update
我会收到错误:
[RuntimeException]
Package could not be downloaded, svn: E195012: Path '.' does not share common version control ancestry with the requested switch location. Use --ignore-ancestry to disable this check.
svn: E195012: 'http://svn.local.acme.com/svn/common/tags/1.3' shares no common ancestry with '/home/user/acid.dev.local.acme.com/composer/vendor/acme/common'
我认为这里的问题是最初(作曲家安装)签出标签而不是导入导入。此错误指定供应商目录是SVN版本(它有.svn文件夹) - 我认为它不应该。