How to require a fork with composer?

This is my composer.json, I want to use Nodge’s fork of lessphp project on Github

 "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 get this error when I run composer update:

nodge/lessphp dev-master -> no matching package found.

I don’t know how to require correctly this fork.

8 Answers
8

Leave a Comment