【发布时间】:2021-12-17 21:22:26
【问题描述】:
我从超级 linter(Github 操作)收到此错误:
PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.19. in /github/workspace/vendor/composer/platform_check.php on line 24
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.19. in /github/workspace/vendor/composer/platform_check.php on line 24
我的作曲家文件:
"require": {
"php": "^7.3||^8.0",
"psalm/plugin-phpunit": "^0.16.1"
},
"require-dev": {
"phpunit/phpunit": "^8.0"
}
【问题讨论】:
-
您正在运行 PHP7,您的一些依赖项需要 PHP8。错误信息很清楚。
-
@yivi 这个项目在我的本地主机上运行没有错误。来自 github 操作的此错误
-
这意味着您在 github 操作中使用 PHP7。使用 this 之类的东西来指定 PHP 版本。
-
@yivi 谢谢。我在 github 操作中设置了 7.3.31。但我再次收到此错误。
-
这与您需要做的完全相反。错误说你需要 v8。 ????♂️
标签: php composer-php