Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top