Search code examples
composer-phpsatis

Private composer repository


I have setup a local SVN repository with the following layout

trunk
  satis
    libraryA
      trunk
        src
        composer.json
      tags
      branches

Which is complying with the documentation.

My satis configuration looks like this:

{
"name": "My repo",
"homepage": "http://myrepo",
"repositories": [
    {
        "type": "vcs",
        "url": "https://myrepo/trunk/satis/libraryA"
    }
],
"require-all": true
}

I have chosen for this setup to prevent having to create a svn repository for each library separately.

Now I am getting the following error:

[Composer\Repository\InvalidRepositoryException]
No valid composer.json was found in any branch or tag of https://myrepo/trunk/satis/libraryA, could not load a package from it.

While I am quite sure that the composer.json in libraryA/trunk is valid (it passes composer validate)


Solution

  • I have found a solution myself. Although I do not think this is the preferred method.

    {
    "name": "My repo",
    "homepage": "http://myrepo",
    "repositories": [
        {
            "type": "vcs",
            "url": "https://myrepo/trunk/"
            "branches-path" : "satis/libraryA"
        }
    ],
    "require-all": true
    }