The PHP version check in prepare.php still allows PHP 7.2 and 7.3
维护者通常 3 天内回复
评估
调研方向
从 issue 中描述的 PHP 版本检查处开始查看 prepare.php,然后读取已准备好的 checkout 中 src/wp-includes/version.php 的 $required_php_version。使用 PHP 7.3.33 和 WPT_PHP_EXECUTABLE 重现报告的情况;完成标准是检查在依赖项安装开始前,以清晰的消息拒绝低于 WordPress 最低版本要求的版本。
由索引模型根据 Issue 内容生成。
描述
prepare.php stops a run when the test environment's PHP is older than 7.2:
if ( version_compare( $env_php_version, '7.2', '<' ) ) {
7.2 was the WordPress minimum when the check was last raised in 33584bb. WordPress 7.0 raised the minimum to PHP 7.4 (r61459, #62622), and the README here already lists PHP 7.4+, but the check still lets 7.2 and 7.3 through.
I ran prepare.php from master (31185de) against current trunk with WPT_PHP_EXECUTABLE pointing to a script that reports PHP 7.3.33. The check passed, the run cloned wordpress-develop, ran npm install and the build, and then stopped in Composer:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires php >=7.4 but your php version (7.3.33; overridden via config.platform, actual: 8.5.11) does not satisfy that requirement.
So a host on PHP 7.2 or 7.3 gets a dependency error after the build, instead of a message that its PHP version is too old.
WordPress keeps its minimum in $required_php_version in src/wp-includes/version.php, which is already in the prepared checkout. Reading it from there would keep the check in line with WordPress without editing it again. I have a fix and will open a pull request.
- 主要语言
- PHP
- 星标
- 77
- 派生
- 79
- 平均合并
- 9 天 2 小时
- 30 天内合并 PR
- 5
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
WordPress/phpunit-test-runner 的其他 Issue
-
make testrunner.sh in host-tools directory可能已有人在做 @iarif4u 于 21 天前认领。 未关闭ContributorDay tooling WCUS26
难度 2/5 1-3 小时 新手友好度 72/100
WordPress/phpunit-test-runner#260 · 4 条评论 ·
维护者通常 3 天内回复
-
create host-tools directory in root folder可能已有人在做 @iarif4u 于 21 天前认领。 未关闭ContributorDay tooling WCUS26
难度 1/5 1 小时以内 新手友好度 78/100
WordPress/phpunit-test-runner#259 · 1 条评论 ·
维护者通常 3 天内回复
-
enhancement tooling WCUS26
难度 4/5 3-5 天 新手友好度 48/100
WordPress/phpunit-test-runner#316 ·
维护者通常 3 天内回复
-
cicd pipeline for testing code changes可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭enhancement help wanted tooling WCUS26
难度 5/5 一周以上 新手友好度 25/100
WordPress/phpunit-test-runner#274 · 4 条评论 ·
维护者通常 3 天内回复
-
Running tests as a multisite fails to submit testing report可能重新可做 @desrosj 于 399 天前认领,目前没有进行中的 PR。 未关闭bug ContributorDay needs testing WCUS26
WordPress/phpunit-test-runner#267 · 2 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
查看 WordPress/phpunit-test-runner 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
MISP/misp-docker#478 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
glpi-project/glpi#26045 ·
维护者通常 1 天内回复
-
sync-en
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
sync-en
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
Перевод устарел
难度 2/5 1-3 小时 新手友好度 82/100