Static compatibility is the start

Test a WordPress plugin across multiple PHP versions.

Use the same WordPress baseline and plugin commit, combine PHPCompatibilityWP and PHPStan with real runtime behavior, then compare warnings and failures without sharing state between tests.

The supported matrix

PHP 7.4, 8.2, 8.3 and 8.4.

SpawnWP provides the same extension set and development tools on every supported runtime. PHP 7.4 is end-of-life and exists only to investigate legacy compatibility; PHP 8.3 or newer remains the sensible baseline for new projects.

A repeatable seven-step workflow

Change one variable at a time.

  1. Prepare a baseline

    Choose Development or create a blueprint with the WordPress version, settings, dependencies and test content required by the plugin.

  2. Create the first site

    Spawn an isolated environment on the first target PHP version. Record the exact blueprint and WordPress version.

  3. Install one plugin commit

    Use the same source revision and fixtures in every environment. Do not mix a code change into the runtime comparison.

  4. Run automated checks

    Run Plugin Check, PHPCS/WPCS, PHPCompatibilityWP for the declared range and PHPStan with WordPress stubs.

  5. Verify runtime behavior

    Activate the plugin, execute its critical flows and inspect the debug log, Query Monitor, WP-Cron events and Mailpit messages.

  6. Repeat the matrix

    Create a separate site for each runtime when parallel comparison matters, or snapshot and switch PHP when sequential testing is enough.

  7. Compare and clean up

    Record version-specific failures, keep a snapshot only when it helps reproduce the issue, then reset or destroy the environments.

What to compare

Evidence from both code and behavior.

A practical result sheet for each PHP runtime.
CheckWhat it catchesEvidence to record
PHPCompatibilityWPRemoved syntax, functions and version-dependent APIsRule, file, line and target range
PHPStanTypes, impossible branches and unsafe callsLevel/config and baseline diff
Plugin Check / PHPCSWordPress.org requirements and coding standardsNew errors versus known warnings
Runtime activationFatal errors, deprecations and bootstrap orderPHP version, WordPress version and debug log
Functional flowsHooks, queries, cron, HTTP and email behaviorExpected result and observed difference
Parallel or sequential?

Choose isolation based on the investigation.

Separate sites make side-by-side comparison and destructive tests easier. Switching one site's PHP runtime is faster when the database and files must remain exactly the same. Snapshot before a risky change and avoid treating a restored snapshot as an independent test baseline.

Build the matrix

Make compatibility failures reproducible.

Start with one clean blueprint and an explicit list of supported PHP versions.

Buy me a coffee