G
G
GrimJack2017-03-07 16:38:07
PHP
GrimJack, 2017-03-07 16:38:07

How to run composer with specific php version?

In general, it costs ipmanager lite 5. The site is running php7, but from the console the composer works under php5.4, how to run it under the php7 version (because one package requires at least php5.5) and is it possible to somehow set it by default? Didn't find anything on google.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Ne-Lexa, 2017-03-07
@NeLexa

Is php7 worth it?
You can try to add the config in the composer, but I'm not sure what will help specifically in this situation, but you need to try. Also, even if you install the package, then on the old version of php, it may simply not start due to the new syntax.

"config": {
    "platform": {
      "php": "5.5"
    }
}

O
OkOl, 2021-01-15
@OkOl

/opt/php/7.3/bin/php composer.phar .......

K
k0nsu1, 2017-03-07
@k0nsu1

i run php5.6 composer.phar update

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question