如何使用 Composer 要求 fork - How to require a fork with composer

问题:

here is my composer.json, i want to use Nodge's fork of lessphp project on Github这是我的 composer.json,我想在 Github 上使用 Nodge 的 lessphp 项目的分支

 "repositories": [{
    "type": "package",
    "package": {
        "version": "dev-master",
        "name": "nodge/lessphp",
        "source": {
            "url": "https://github.com/Nodge/lessphp.git",
            "type": "git",
            "reference": "master"
        },
        "autoload": {
            "classmap": ["lessc.inc.php"]
        }
    }
}],
"require": {
    "php": ">=5.3.3",
    "nodge/lessphp": "dev-master"
},

But i have this error when i make update :但是当我进行更新时出现此错误:

nodge/lessphp dev-master -> no matching package found. nodge/lessphp dev-master -> 没有找到匹配的包。

I don't know how to require it correctly this fork...我不知道如何正确地要求这个叉子......

Any suggestions ?有什么建议么 ?


解决方案:

参考一: https://en.stackoom.com/question/uda3
参考二: https://stackoom.com/question/uda3
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章