Skip to content

Update plugin to be compatible with PHP 8.3#9

Open
Copilot wants to merge 1 commit into
masterfrom
copilot/update-plugin-to-php-8-3
Open

Update plugin to be compatible with PHP 8.3#9
Copilot wants to merge 1 commit into
masterfrom
copilot/update-plugin-to-php-8-3

Conversation

Copy link
Copy Markdown

Copilot AI commented May 13, 2026

The plugin's dependencies and method signatures were incompatible with PHP 8.3.

Changes

  • PHP version constraint: ^7.4 || ^8.0 || ^8.1^7.4 || ^8.0 (covers all 8.x)
  • Method signature mismatches: QueueInterface declared non-nullable params for set_entries, set_entry_handler, set_entry_fetcher but implementations used nullable types — generates deprecation notices in PHP 8.3
  • Dev dependencies: Replaced pinned/incompatible packages (predis 2.0.x-dev, phpunit ^9, geniem-rules-codesniffer, composer-git-hooks) with PHP 8.3-compatible versions
  • Null safety: Base::set_entries() and MockQueue::set_entries() now handle null input correctly

Interface fix example

// Before (incompatible signatures between interface and implementation)
// QueueInterface:
public function set_entries( array $entries );
// Base.php:
public function set_entries( ?array $entries );  // PHP 8.3 deprecation

// After (interface updated to match legitimate nullable usage)
public function set_entries( ?array $entries );

All 11 tests pass on PHP 8.3 with zero deprecation notices.

- Update composer.json PHP version constraint to ^7.4 || ^8.0 (covers all 8.x)
- Update dev dependencies to PHP 8.3-compatible versions
- Fix method signature mismatches between QueueInterface and implementations
  (nullable params in interface to match Base.php implementations)
- Fix MockQueue::set_entries to have proper type declaration
- Fix Base::set_entries to handle null entries safely
- Update plugin.php Requires PHP header
- Remove incompatible dev dependencies (geniem-rules-codesniffer, composer-git-hooks)
- Update composer.lock for PHP 8.3 compatibility

Agent-Logs-Url: https://github.com/devgeniem/wp-queue/sessions/e468d4f1-0d1b-40d2-8815-461dc76de976

Co-authored-by: mmatiasautio <130443809+mmatiasautio@users.noreply.github.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