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

It’s recommended to fake php version, rather than ignore platform requirements. Add


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

An example of sufficient config to fake php version:

    "config": {

It may have much more options though.

starting from v2.3.0 you can use environment variables.
Please see Yakatz’ answer

Leave a Comment