composer 引入本地指定包

开发类库时,本地需要测试一下,在没有push时,如何引入正在开发的包?

{
    "repositories": [
        {
            "type": "path",
            "url": "D:\\Data\\yii2-adminlte3"
        }
    ]
}

type必须时path,url时指定的是包路径,然后 composer require 正常引入即可

composer require hail812/yii2-adminlte3

[InvalidArgumentException]
  Package hail812/yii2-adminlte3 exists in composer repo (https://mirrors.aliyun.com/composer) and path repo (D:\Data\yii2-adminlte3) which has a highe
  r repository priority. The packages from the higher priority repository do not match your minimum-stability and are therefore not installable. That r
  epository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.

我这报错提示,不匹配 minium-stability,把 minium-stability 改为 dev,再试一次就可以了 

posted @ 2022-03-30 07:56  hailπ  阅读(1102)  评论(0编辑  收藏  举报