Skip to content

Raise the minimum supported PHP version to 8.2 - #104

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

dkotter merged 3 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 #98

This raises the minimum supported PHP version from 7.4 to 8.2 and tests the plugin up to PHP 8.5. The repository has no pull request template, so this follows the usual 10up sections.

PHP 7.4, 8.0 and 8.1 no longer get security fixes. The plugin's own code needed no changes to run on 8.2 to 8.5.

Changes:

  • embed-block-figma.php: Requires PHP header and the bootstrap guard now say 8.2. The guard stays, so sites on older PHP still get the notice instead of a fatal error.
  • readme.txt: added the missing Requires PHP: 8.2 line.
  • composer.json: require.php is now >=8.2.
  • phpcs.xml and phpcs-compat.xml: testVersion is now 8.2-.
  • .github/workflows/test.yml: the PHP matrix is now 8.2, 8.3, 8.4 and 8.5.
  • README.md and the Playground blueprint: now say PHP 8.2.
  • composer.lock: refreshed. phpcompatibility/php-compatibility moved from dev-develop to the stable 9.3.5.

Maintainer note on composer.lock. The dev-develop branch of PHPCompatibility now requires PHPCS 4, and 10up/phpcs-composer pulls in VIP-WPCS, which requires PHPCS 3. The two cannot be installed together, so the lock could not be refreshed with that package in place. I removed the direct phpcompatibility/php-compatibility entry from require-dev and let it resolve through phpcompatibility-wp.

PHPCompatibility 9.3.5 has no sniffs for PHP 8.1 or later. The php-compat workflow can no longer flag problems on 8.2 to 8.5. A separate PHPCompatibility 10 install would fix that. I left it out of this pull request.

Checks run before this change:

  • PHPCompatibility 10 on the plugin code with testVersion 8.2-8.5: no findings.
  • php -l on 8.2, 8.3, 8.4 and 8.5: clean.
  • composer install from the previous lock on 8.2 and 8.5: passes.
  • PHPUnit on PHP 8.2.36 and 8.5.13: 10 tests, 20 assertions, OK.
  • WP_DEBUG log on 8.5 while running the embed_defaults and oEmbed proxy filters: no deprecations from plugin code.

How to test the Change

  1. Check out this branch and run composer install. It should finish without a lock warning.
  2. Run npm run wp-env:test start, then npm run test:php. The tests should pass.
  3. In a site on PHP 8.2 or newer, activate the plugin and paste a Figma URL on a new line in the editor. The Figma embed block should appear and render.
  4. Check the Plugins screen. The plugin should show Requires PHP: 8.2.
  5. On a site running PHP below 8.2, activating the plugin should show the PHP requirement notice, not a fatal error.

Changelog Entry

Changed - Raise the minimum supported PHP version to 8.2.
Changed - Test on PHP 8.2 to 8.5.

Credits

Props @phpbits

@phpbits
phpbits marked this pull request as ready for review December 2, 2026 17:40
@phpbits

phpbits commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

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

@dkotter dkotter added this to the 0.5.0 milestone Dec 3, 2026
@dkotter
dkotter merged commit 0d3217f into develop Dec 3, 2026
26 checks passed
@dkotter
dkotter deleted the php-8.2-8.5-compat branch December 3, 2026 02:47
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

2 participants