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,再試一次就可以了 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM