Composer无法读取我的本地Satispackages.json文件 [英] Composer is not reading my local Satis packages.json file

查看:246
本文介绍了Composer无法读取我的本地Satispackages.json文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Satis设置了我的本地SVN存储库以容纳所有外部存储库(公司政策),我创建了packages.json文件.当我运行composer update时,如何告诉它使用自定义的packages.json文件并从本地存储库而不是外部存储库中提取文件?

I have setup my local SVN repo to hold all external repos ( company policy ), using Satis I've created the packages.json file. when I run composer update how do I tell it to use my custom packages.json file and pull from my local repo instead of externals?

这是我的svn仓库所在的packages.json文件的摘要:

This is a blurb from the packages.json file on where my svn repos are:

"source": {
    "type": "svn",
    "url": "http://blah/packagist/foo/bar",
    "reference": "/tags/2.3.0/@38"
}

但是我用来检查该项目的URL是:

but the url I would use to check this project out would be:

http://blah/packagist/foo/bar/tags/2.3.0    

在我的composer.json文件中,还添加了以下内容:

in my composer.json file I have also added this:

"repositories": [
    {
        "packagist": false,
        "type": "composer",
        "url": "http://local/packages.json"
    }
]

但是它仍然是从git而不是我的svn存储库中提取的,我在做什么错??

but it's still pulling in from git and not my svn repo, what am I doing wrong???

推荐答案

第一步是像这样正确禁用packagist:

First step is to disable packagist properly like this:

"repositories": [
    { "packagist": false },
    {
        "type": "composer",
        "url": "http://local/packages.json"
    }
]

然后,我想如果本地仓库中不存在所需的软件包,您可能会出错.

Then I guess you may get an error if the packages you need don't exist in your local repo.

那就是说,如果没有捡起它,则可能意味着您的satis存储库中没有包含您需要的所有软件包,因为如果存在,它们应该比包装专家优先.如果您只有标签,尽管它可能会选择包装主义者的标签,因为它们包含dev-master和更高版本的prio版本.

That said, if it didn't pick it up, it probably means your satis repo isn't containing all the packages you need, because if they are there they should take priority over the packagist ones. If you only have tags though it might pick packagist ones since they contain dev-master and such higher prio versions.

这篇关于Composer无法读取我的本地Satispackages.json文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆