Skip to main content

Guidelines for choosing PHP versions in tests

Use WordPress.org PHP usage statistics to choose the most widely used version within WooCommerce's supported range for representative coverage. Also test the minimum and latest supported versions. PHP unit tests cover all three roles in routine CI; broader E2E coverage runs nightly to limit CI cost.

Version choiceConfigured PHPE2E coveragePHP unit coverageWhy
Representative version8.3PR, push, release, pre-release, and nightlyPR and push, with latest WordPressFocus frequent checks on a widely used PHP runtime, using WordPress.org adoption data to guide the choice.
Minimum supported by WooCommerce7.4Standard Core and Blocks nightly suitesPR and push, with WordPress L-1; optional WordPress pre-releasePreserve minimum-version compatibility through PHP behavior checks and complete user flows.
Latest supported by WooCommerce8.5Standard Core and Blocks nightly suites; existing Core jobs also run on PR, release, and pre-releasePR and push, with latest WordPress, including HPOS disabledCatch compatibility problems as merchants adopt newer PHP releases.