【问题标题】:Could not add composer dependency of own github repo无法添加自己的 github repo 的 composer 依赖项
【发布时间】:2020-06-12 01:23:08
【问题描述】:

知道为什么作曲家会抛出以下错误:

[InvalidArgumentException]
  Could not find a matching version of package divix1988/laminas-smarty-module. Check the package spelling, your vers
  ion constraint and that the package is available in a stability which matches your minimum-stability (stable).

尝试通过以下方式添加我自己的新依赖项时: composer require divix1988/laminas-smarty-module?

https://github.com/divix1988/laminas-smarty-module

【问题讨论】:

标签: git github composer-php


【解决方案1】:

要通过 composer 获取包,您必须先将其添加到 packagist。从 here 登录 packageagist,然后添加您的包。当你的包出现在 packagist 上时,你可以使用 composer 来请求它。

【讨论】:

    【解决方案2】:

    有两种方式:

    
        "repositories": [
            {
                "type": "vcs",
                "url": "git@github.com:divix1988/laminas-smarty-module.git"
            }
        ],
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-09-11
      • 2017-03-29
      • 2016-07-08
      • 2019-01-24
      • 1970-01-01
      • 2015-01-24
      相关资源
      最近更新 更多