1

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

Phill Pafford
  • 83,471
  • 91
  • 263
  • 383

1 Answers1

5

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.

Seldaek
  • 40,986
  • 9
  • 97
  • 77
  • OMG that did it `{ "packagist": false },` headache is going away! I think I was confused as to the docs: http://getcomposer.org/doc/articles/handling-private-packages-with-satis.md and http://getcomposer.org/doc/05-repositories.md – Phill Pafford Nov 07 '12 at 20:02
  • Fair enough, I can see how this could be misleading if you don't pay too much attention to the fact there is an array around the object :) – Seldaek Nov 07 '12 at 20:08