0

My composer.json looks like this:

{
    "minimum-stability": "dev"
}

I'm trying to run composer require phpseclib/phpseclib:dev-3.0 (based off of https://stackoverflow.com/a/33526908/569976) but when I try I get this error:

  [InvalidArgumentException]
  Could not find a matching version of package phpseclib/phpseclib. Check the package spelling, your version cons
  traint and that the package is available in a stability which matches your minimum-stability (dev).

3.0 is a valid branch name (https://github.com/phpseclib/phpseclib/tree/3.0) so I'm not entirely sure what the problem is.

I also tried using this as my composer.json:

{
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/phpseclib/phpseclib.git"
        }
    ],
    "minimum-stability": "dev"
}

No luck.

Any ideas?

neubert
  • 15,947
  • 24
  • 120
  • 212

1 Answers1

4

dev-branch convention is used for branches that does not look like version. 3.0 branch looks like version, so you need to use branch.x-dev convention - 3.0.x-dev in your case. This is explained in documentation. You can also find list of available versions for this package on Packagist.

rob006
  • 21,383
  • 5
  • 53
  • 74