Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#359 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

@ekamran is already working on this.

Since Oct 19, 2026.

  • #360 by @ekamran — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
cli

Research direction

Start in prepare.php at the PHP version check described in the issue, then read $required_php_version in the prepared checkout's src/wp-includes/version.php. Reproduce the reported case with PHP 7.3.33 and WPT_PHP_EXECUTABLE; done means the check rejects versions below the WordPress minimum with a clear message before dependency installation begins.

Written by the indexing model from the issue text.

Description

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.

Dominant language
PHP
Stars
77
Forks
79
Avg merge
9d 2h
Merged PRs (30d)
5

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WordPress/phpunit-test-runner

All issues in WordPress/phpunit-test-runner

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.