简体   繁体   English

Composer无法读取我的本地Satispackages.json文件

[英]Composer is not reading my local Satis packages.json file

I have setup my local SVN repo to hold all external repos ( company policy ), using Satis I've created the packages.json file. 我已经使用Satis设置了本地SVN存储库以容纳所有外部存储库(公司政策),我创建了packages.json文件。 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? 当我运行composer update时,如何告诉它使用自定义的packages.json文件并从本地存储库而不是外部存储库中提取文件?

This is a blurb from the packages.json file on where my svn repos are: 这是我的svn仓库所在的packages.json文件的摘要:

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

but the url I would use to check this project out would be: 但我用来检查该项目的网址是:

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

in my composer.json file I have also added this: 在我的composer.json文件中,我还添加了以下内容:

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

but it's still pulling in from git and not my svn repo, what am I doing wrong??? 但是它仍然是从git而不是我的svn repo中提取的,我在做什么错???

First step is to disable packagist properly like this: 第一步是像这样正确禁用packagist:

"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. 然后,如果本地仓库中不存在所需的软件包,我想您可能会出错。

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. 就是说,如果没有捡起它,则可能意味着您的satis存储库中没有包含您需要的所有软件包,因为如果存在,它们应该比包装专家优先。 If you only have tags though it might pick packagist ones since they contain dev-master and such higher prio versions. 如果您只有标签,尽管它可能会选择包装主义者的标签,因为它们包含dev-master和更高版本的prio版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM