php - How to always use ignore-platform-reqs flag when running composer? -


on local machine, have php v7.0.3. project of mine has dependency on php v5.5.

so expected, simple run of composer install crashes:

your requirements not resolved installable set of packages.    problem 1     - package requires php ~5.5 php version (7.0.3) not satisfy requirement. 

i know can ignore platform via:

composer install --ignore-platform-reqs 

yet forget add flag. yet since application runs inside docker container, mismatching php can install dependencies fine.

so wondering if there way make local composer assume --ignore-platform-reqs in order not having type it.

i avoid setting alias , have work on composer config level.

it's recommended fake php version, rather ignore platform requirements. add

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

to ~/.composer/config.json or use composer config -g -e edit it.

an example of sufficient config fake php version:

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

it may have more options though.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -