Ignoring PHP version requirements with composer
Published on 2023-06-10 • Modified on 2023-06-10
In a previous snippet, we saw how to ignore platform requirements globally. Composer now allows ignoring specific requirement parameters. When you run composer install
, sometimes, it can be useful to ignore the PHP platform requirements. A typical case, for instance, is when your production servers' minor version doesn't comply with the specified version in the config.platform.php
parameter of the composer.json
file. It is generally safe to force the installation for this case. Use this with care and only if you really know what you are doing!
composer install --ignore-platform-req=php
More on Stackoverflow Read the doc More on the web Random snippet
Call to action
Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )
- Report any error/typo.
- Report something that could be improved.
- Like and repost!
- Follow me on Bluesky 🦋
- Subscribe to the RSS feed.
- Click on the More on Stackoverflow buttons to make me win "Announcer" badges 🏅.
Thank you for reading! And see you soon on Strangebuzz! 😉