Your Composer dependencies require a PHP version “>= 8.1.0“. You are running 7.2.6.

背景:composer update 更新后,某天在执行phpunit单元测试时,报错

Your Composer dependencies require a PHP version ">= 8.1.0". You are running 7.2.6.

解决:

1、查看Composer的全局配置composer config -l -g

可以发现platform_check.php 是开启的

Your Composer dependencies require a PHP version “>= 8.1.0“. You are running 7.2.6._第1张图片

2、更改Composer的全局配置composer config -g platform-check false

3、如果更改后还是不行,在项目根目录执行composer update后解决 

你可能感兴趣的:(PHP问题解答,php,composer,java)