Skip to content

Declare PHP 7.4+ support and fix PHP 8.x deprecations - #86

Open
spacedmonkey wants to merge 2 commits into
WP-API:mainfrom
spacedmonkey:feat/php-support
Open

spacedmonkey wants to merge 2 commits into
WP-API:mainfrom
spacedmonkey:feat/php-support

Conversation

@spacedmonkey

Copy link
Copy Markdown
Contributor

Summary

  • Bump the plugin header's Requires PHP from 5.6 to 7.4, matching the existing composer.json constraint (">=7.4", no upper bound)
  • Add the missing Requires PHP: 7.4 line to bin/readme.txt, and a parity line to README.md
  • Wire up the already-installed phpcompatibility/phpcompatibility-wp dev dependency in .phpcs.xml.dist with an open-ended testVersion="7.4-" so future PHP 8.x/9 releases keep being checked automatically
  • Expand the GitHub Actions PHP test matrix from 8.0-8.3 to 7.4, 8.0-8.5
  • Fix two PHP 8.x deprecations found via a full-codebase scan, both 7.4-compatible:
    • Implicitly-nullable typed params (deprecated PHP 8.4+) in inc/admin/namespace.php and inc/types/class-base.php — made nullability explicit (?Client, ?WP_Error)
    • Dynamic property creation (deprecated PHP 8.2+) in inc/class-scopes.php — added the missing $scopes property declaration

No other PHP 7.4/8.x compatibility issues were found in the codebase (no PHP-8-only syntax, no removed functions, no missing-polyfill risk).

Test plan

  • composer install succeeds
  • vendor/bin/phpcs runs clean (24 files, 0 errors, 0 warnings) including the new PHPCompatibilityWP checks
  • CI matrix (PHP 7.4-8.5 x WP 6.5-6.9) passes

🤖 Generated with Claude Code

Bump the plugin header's Requires PHP from 5.6 to 7.4 to match the
existing composer.json constraint, add the missing Requires PHP line
to readme.txt/README.md, wire up the already-installed
PHPCompatibilityWP ruleset in phpcs (open-ended testVersion, no upper
bound), expand the CI matrix to 7.4 through 8.5, and fix two PHP 8.x
deprecations (implicitly-nullable typed params, dynamic property
creation) while keeping PHP 7.4 compatibility.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

2 participants