Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

The PHP version check in prepare.php still allows PHP 7.2 and 7.3

オープン 初心者向け
#359 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@ekamran がすでに取り組んでいます。

2026年10月19日 から。

  • #360 @ekamran による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php
領域
cli

調査の方向性

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WordPress/phpunit-test-runner のほかの issue

WordPress/phpunit-test-runner の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。