PHP Composer - predis/predis 1.1.x-dev requires php >=5.3.9 -> no matching package found

3.3k views Asked by At

I'm trying to install a lib with composer but I get:

predis/predis 1.1.x-dev requires php >=5.3.9 -> no matching package found.

It's on a local dev server with PHP 5.3.8. I don't want to change PHP version on the dev machine. It's just for evaluation and it's OK for me to take the risk of using it with outdated PHP lib.

How can I override and make Predis work even though I run a PHP version it's not supposed to support?

Note that I'm installing another package that use it. I don't install Predis directly. In the composer.json file of the package I'm installing, the definition of Predis looks like this:

"require": {
  "blainesch/prettyarray": "dev-master",
  "predis/predis": "dev-master"
},
2

There are 2 answers

0
Wouter J On

Never use dev-master versions.

Besides that, the package simply doesn't support PHP5.3.8. If you bypass the check by composer, you'll get errors when running your code. Composer is created to prevent this and to remove the hassle of finding all requirements yourself.

0
Abrar Jahin On

Use this-

"require": {
    ......
    "predis/predis": "1.1.*@dev",
    ......
},

Should work