The PHP version check in prepare.php still allows PHP 7.2 and 7.3
Maintainers usually reply within 3 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WordPress/phpunit-test-runner
-
make testrunner.sh in host-tools directoryPossibly taken @iarif4u claimed this 21 days ago. OpenContributorDay tooling WCUS26
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
WordPress/phpunit-test-runner#260 · 4 comments ·
Maintainers usually reply within 3 days
-
create host-tools directory in root folderPossibly taken @iarif4u claimed this 21 days ago. OpenContributorDay tooling WCUS26
Difficulty 1/5 Under an hour Newbie friendliness 78/100
WordPress/phpunit-test-runner#259 · 1 comment ·
Maintainers usually reply within 3 days
-
enhancement tooling WCUS26
Difficulty 4/5 3-5 days Newbie friendliness 48/100
WordPress/phpunit-test-runner#316 ·
Maintainers usually reply within 3 days
-
cicd pipeline for testing code changesPossibly taken A pull request linked to this issue is open or already merged. Openenhancement help wanted tooling WCUS26
Difficulty 5/5 Over a week Newbie friendliness 25/100
WordPress/phpunit-test-runner#274 · 4 comments ·
Maintainers usually reply within 3 days
-
Running tests as a multisite fails to submit testing reportMay be free again @desrosj claimed this 399 days ago, and no pull request is open. Openbug ContributorDay needs testing WCUS26
WordPress/phpunit-test-runner#267 · 2 comments · 1 assignee ·
Maintainers usually reply within 3 days
All issues in WordPress/phpunit-test-runner
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
PHP SDK drops the API path prefix when a custom base URL has no trailing slashPossibly taken @Winoren claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
langgenius/dify#44568 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day