Composer is not reading my local Satis packages.json file

倖福魔咒の 提交于 2019-12-24 15:27:13

问题


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?

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"
}

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:

"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???


回答1:


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.

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.



来源:https://stackoverflow.com/questions/13277110/composer-is-not-reading-my-local-satis-packages-json-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!