Chris Reedy
Chris Reedy

Reputation: 443

Adding git repository with Composer for development branch where no composer.json present

I have been trying to install a git repository that does not have a composer.json file. I followed the instructions on the composer website and also found in this stackexchange post: Composer - adding git repository without composer.json

However, I am still not able to get it to work. I keep getting an error stating: "The requested package phpredis/phredis could not be found in any version, there may be a typo in the package name.

This is my composer.json file on my system (note that predis/predis loads fine but I want to use the other redis package):

{
"respositories": [
    {
        "type":"package",
        "package": 
        {
            "name":"phpredis/phpredis",
            "version":"develop",
            "dist":
            {
                "url":"https://github.com/phpredis/phpredis.git",
                "type":"git"
            }
        }
    }
],

    "require": {
        "predis/predis": "^1.0",
        "phpredis/phpredis":"dev-master@dev"
    }
}

I know that I must be making a simple error somewhere but I have spent hours and can't figure it out. Thanks for the help.

Upvotes: 0

Views: 256

Answers (1)

Sven
Sven

Reputation: 70863

It's useless to fiddle with any composer.json replacement for this repository because it contains C software that needs to be compiled and installed as a PHP extension. Composer won't do this for you, it can only manage PHP source code.

Upvotes: 1

Related Questions