0

We are using custom repositories that are not held on Packagist, and thus need to use composer's "repositories" key:

{
    "type": "vcs",
    "url": "https://github.com/name/repo"
},

However we also want to develop these locally before pushing them to GitHub

{
    "type": "vcs",
    "url": "/path/to/repo"
},
{
    "type": "vcs",
    "url": "https://github.com/name/repo"
}

However if a new user downloads the repo and just wants to use from GitHub (maybe they won't be developing locally) they get a big red error:

[InvalidArgumentException]
No driver found to handle VCS repository /path/to/dir

Is there a way that composer can tolerate this and just move down to the next line where it will find the repo?

MarthyM
  • 1,839
  • 2
  • 21
  • 23
M1ke
  • 6,166
  • 4
  • 32
  • 50

1 Answers1

1

That this is possible right now, as far as I know. The defined "/path/to/dir" needs to exist, it needs to be a repo and the repo needs to contain a composer.json file, otherwise Composer will fail.

Sounds like a valid point for a PR to ignore an invalid repository definition but not sure what Jordie thinks of this ;)

As an alternative: You could set-up your own Satis repo and pull the package from there.

  • Thanks, I think I've found the offending code in the repository so may try fork and PR. – M1ke Jan 20 '15 at 09:04