Skip to content

Raise the minimum PHP version to 8.2 - #274

Merged
dkotter merged 2 commits into
developfrom
php-8.2-8.5-compat
Dec 2, 2026
Merged

dkotter merged 2 commits into
developfrom
php-8.2-8.5-compat

Conversation

@phpbits

@phpbits phpbits commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Description of the Change

Closes #266

This raises the minimum supported PHP version from 8.0 to 8.2. The plugin is tested on PHP 8.2 through 8.5.

  • convert-to-blocks.php: Requires PHP is now 8.2, and the bootstrap guard returns 8.2.
  • readme.txt: added the missing Requires PHP: 8.2 line.
  • composer.json: require.php is now >=8.2. composer.lock was refreshed with composer update --lock. It changes the content hash, the platform entry and plugin-api-version. Composer also updated the PHP_CodeSniffer source URL to its new owner, with the same commit.
  • .github/workflows/test.yml: the PHP matrix is now 8.2, 8.3, 8.4 and 8.5.
  • .github/workflows/lint.yml: the lint job runs on PHP 8.2.
  • .wordpress-org/blueprints/blueprint.json: the Playground demo uses PHP 8.2.

No plugin code needed to change. PHPCompatibility 10 found nothing in the plugin's own code for 8.2 to 8.5, and the plugin ships no third-party PHP.

How to test the Change

  1. Run npm run build, then start the test site with WP_ENV_PHP_VERSION=8.2 npm run wp-env:test start.
  2. Run npm run test:php -- --verbose and check for Runtime: PHP 8.2.x and a passing result.
  3. Stop the site, start it again with WP_ENV_PHP_VERSION=8.5, and run the same command.
  4. Run npm run test:e2e against the running site.
  5. Run composer lint.

Checks I ran:

Check Versions Result
PHPCompatibility 10 8.2 to 8.5 No findings
php -l on every PHP file 8.2, 8.3, 8.4, 8.5 Clean
Composer install from the lock 8.2, 8.5 Passes, with and without dev packages
PHPUnit 8.2.36, 8.5.13 24 tests pass on both
Playwright E2E 8.5.13 2 specs pass
phpcs . 8.2 Clean

Changelog Entry

Changed - Bump the minimum supported PHP version from 8.0 to 8.2, and test on PHP 8.2 through 8.5.

I left CHANGELOG.md and the readme.txt changelog alone, because they are assembled at release time.

Credits

Props @phpbits

Set Requires PHP to 8.2 in the plugin header, readme.txt, the bootstrap guard and composer.json, and refresh composer.lock. Test on PHP 8.2 to 8.5 in CI, run lint on PHP 8.2, and use PHP 8.2 in the Playground blueprint.
@phpbits
phpbits marked this pull request as ready for review December 2, 2026 11:45
@phpbits

phpbits commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@jeffpaul This is now ready for code review. Thanks!

@jeffpaul jeffpaul added this to the 1.4.0 milestone Dec 2, 2026
Comment thread readme.txt Outdated
Contributors: 10up, dsawardekar, tlovett1, jeffpaul
Tags: block, block migration, gutenberg migration, gutenberg conversion, convert to blocks
Tested up to: 7.1
Requires PHP: 8.2

@dkotter dkotter Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already exists in the main plugin file, not sure we need to add this here as well

@dkotter
dkotter merged commit 9785671 into develop Dec 2, 2026
26 checks passed
@dkotter
dkotter deleted the php-8.2-8.5-compat branch December 2, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update PHP support to 8.2–8.5

3 participants