无法通过作曲家安装最新的git版本的分支

问题描述 投票:0回答:1

我的composer.json看起来像这样:

{
    "minimum-stability": "dev"
}

我正在尝试运行composer require phpseclib/phpseclib:dev-3.0(基于https://stackoverflow.com/a/33526908/569976),但是当我尝试时出现此错误:

  [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是有效的分支名称(https://github.com/phpseclib/phpseclib/tree/3.0),所以我不确定是什么问题。

我也尝试使用它作为我的composer.json:

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

不走运。

有什么想法吗?

php composer-php phpseclib
1个回答
0
投票

dev-branch约定用于看起来不像版本的分支。 3.0分支看起来像版本,因此您需要使用branch.x-dev约定-您需要使用3.0.x-dev。在documentation中对此进行了说明。您还可以在Packagist上找到此软件包的可用版本列表。

© www.soinside.com 2019 - 2024. All rights reserved.