Composer对PHP版本错误提示
错误如下:
Composer detected issues in your platform:
Your Composer dependencies require a PHP version ">= 7.4.0". You are running 7.3.24-(to be removed in future macOS).
PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.0". You are running 7.3.24-(to be removed in future macOS).
解决办法:
1、在项目根目录的composer.josn
内增加
{
"config": {
"platform-check": false
}
}
2、清除配置缓存:
run php artisan config:cache
3、重构对象,在控制台执行:
composer dump-autoload