The PHP version check in prepare.php still allows PHP 7.2 and 7.3
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
issueで説明されているPHPバージョンチェックの箇所からprepare.phpを確認し、次に準備済みチェックアウトの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
- 平均マージ
- 4日 19時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WordPress/phpunit-test-runner のほかの issue
-
make testrunner.sh in host-tools directory対応中かも @iarif4u が 18 日前に担当しました。 オープンContributorDay tooling WCUS26
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
WordPress/phpunit-test-runner#260 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
create host-tools directory in root folder対応中かも @iarif4u が 18 日前に担当しました。 オープンContributorDay tooling WCUS26
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
WordPress/phpunit-test-runner#259 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
A database password with a quote or a backslash breaks wp-tests-config.php対応中かも @ekamran が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
WordPress/phpunit-test-runner#354 ·
メンテナーはふだん 2 日以内に返信
-
Error: Error uploading results: Invalid parameter(s): message (HTTP status 400)`対応中かも @ekamran が 19 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
WordPress/phpunit-test-runner#335 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
enhancement tooling WCUS26
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
WordPress/phpunit-test-runner#316 ·
メンテナーはふだん 2 日以内に返信
WordPress/phpunit-test-runner の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
verbb/formie#3022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Automattic/blocks-engine#3090 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
macOS
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
beyondcode/herd-community#1771 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100