简体   繁体   English

如何在开发 octobercms 网站时解决此作曲家错误,我使用的是 php 7.4

[英]how to solve this composer error when developing octobercms website ,i am using php 7.4

our Composer dependencies require a PHP version ">= 8.1.0".我们的 Composer 依赖项需要 PHP 版本 ">= 8.1.0"。 You are running 7.4.30.您正在运行 7.4.30。

PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". PHP 致命错误:Composer 在您的平台中检测到问题:您的 Composer 依赖项需要 PHP 版本">= 8.1.0"。 You are running 7.4.30.您正在运行 7.4.30。

Update your PHP version to 8.1.0 or use an earlier build of octoberCMS that supports php version 7.4.30将您的 PHP 版本更新到 8.1.0 或使用支持 php 版本 7.4.30 的早期版本 octoberCMS

I have solved the issue by changing the following code from vendor/composer/platform_check.php我通过从 vendor/composer/platform_check.php 更改以下代码解决了这个问题

if (.(PHP_VERSION_ID >= 80100)) { $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". if (.(PHP_VERSION_ID >= 80100)) { $issues[] = '您的 Composer 依赖项需要 PHP 版本 ">= 8.1.0"。 You are running '.你在跑步 '。 PHP_VERSION. PHP_版本。 ';'; ';'; } }

To

if (.(PHP_VERSION_ID >= 70400)) { $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". if (.(PHP_VERSION_ID >= 70400)) { $issues[] = '您的 Composer 依赖项需要 PHP 版本 ">= 7.4.0"。 You are running '.你在跑步 '。 PHP_VERSION. PHP_版本。 ';'; ';'; } }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM