Skip to content

Update plugin to be compatible with PHP 8.3#9

Merged
mmatiasautio merged 4 commits into
masterfrom
copilot/update-plugin-to-php-8-3
May 15, 2026
Merged

Update plugin to be compatible with PHP 8.3#9
mmatiasautio merged 4 commits into
masterfrom
copilot/update-plugin-to-php-8-3

Conversation

Copy link
Copy Markdown
Contributor

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^8.0 (drops PHP 7.4, 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: Updated pinned/incompatible packages (predis 2.0.x-dev^2.0, phpunit ^9^9.6, m6web/redis-mock ^5^5.6) to PHP 8.3-compatible versions while retaining devgeniem/geniem-rules-codesniffer and brainmaestro/composer-git-hooks
  • 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>
Comment thread composer.json Outdated
},
"require": {
"php": "^7.4 || ^8.0 || ^8.1",
"php": "^7.4 || ^8.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tästä voisi oikeastaan jo poistaa 7.4 eli pelkästään ^8.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 02a7c2b — PHP requirement is now ^8.0 only.

Comment thread composer.json
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"devgeniem/geniem-rules-codesniffer": "^1",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Eikö tää ja lint-skripti kannattaisi säilyttää? Vai miksei voi käyttää?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Restored in 02a7c2bdevgeniem/geniem-rules-codesniffer, brainmaestro/composer-git-hooks, lint scripts, and pre-commit hooks are all back.

@mmatiasautio
Copy link
Copy Markdown
Contributor

@copilot Apply these chnages to the current branch

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 15, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/70bg6X /usr/bin/composer install (http block)
  • https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/963f0c67bffde0eac41b56be71ac0e8ba132f0bd
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/70bg6X /usr/bin/composer install (http block)
  • https://api.github.com/repos/composer/installers/zipball/12fb2dfe5e16183de69e784a7b84046c43d97e8e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/70bg6X /usr/bin/composer install (http block)
  • https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/comparator/zipball/e4df00b9b3571187db2831ae9aada2c6efbd715d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/rUK8qu /usr/bin/composer update --lock (http block)
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/rUK8qu /usr/bin/composer update --lock (http block)
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/rUK8qu /usr/bin/composer update --lock (http block)
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/rUK8qu /usr/bin/composer update --lock (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/70bg6X /usr/bin/composer install (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/rUK8qu /usr/bin/composer update --lock (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/70bg6X /usr/bin/composer install (http block)
  • https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/rUK8qu /usr/bin/composer update --lock (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/70bg6X /usr/bin/composer install (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/rUK8qu /usr/bin/composer update --lock (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/70bg6X /usr/bin/composer install (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/rUK8qu /usr/bin/composer update --lock (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/70bg6X /usr/bin/composer install (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@github-actions
Copy link
Copy Markdown

Composer package changes
Dev Packages Operation Base Target
antecedent/patchwork Upgraded 2.1.17 2.2.3
automattic/vipwpcs Upgraded 2.3.3 3.0.1
composer/installers Upgraded v2.0.1 v2.3.0
dealerdirect/phpcodesniffer-composer-installer Upgraded v0.7.1 v1.2.1
devgeniem/geniem-rules-codesniffer Upgraded 1.2.1 1.5.0
doctrine/instantiator Upgraded 1.4.0 2.0.0
hamcrest/hamcrest-php Upgraded v2.0.1 v2.1.1
m6web/redis-mock Upgraded v5.0.1 v5.6.0
mockery/mockery Upgraded 1.4.4 1.6.12
myclabs/deep-copy Upgraded 1.10.2 1.13.4
nikic/php-parser Upgraded v4.13.2 v5.7.0
phar-io/manifest Upgraded 2.0.3 2.0.4
phar-io/version Upgraded 3.1.0 3.2.1
phpcsstandards/phpcsextra New - 1.5.0
phpcsstandards/phpcsutils New - 1.2.2
phpunit/php-code-coverage Upgraded 9.2.10 9.2.32
phpunit/phpunit Upgraded 9.5.10 9.6.34
predis/predis Changed dev-main 4c1aada v2.4.1
roave/security-advisories Changed dev-latest 31d9d9e dev-latest 16706d8
sebastian/cli-parser Upgraded 1.0.1 1.0.2
sebastian/comparator Upgraded 4.0.6 4.0.10
sebastian/complexity Upgraded 2.0.2 2.0.3
sebastian/diff Upgraded 4.0.4 4.0.6
sebastian/environment Upgraded 5.1.3 5.1.5
sebastian/exporter Upgraded 4.0.4 4.0.8
sebastian/global-state Upgraded 5.0.3 5.0.8
sebastian/lines-of-code Upgraded 1.0.3 1.0.4
sebastian/recursion-context Upgraded 4.0.4 4.0.6
sebastian/resource-operations Upgraded 3.0.3 3.0.4
sebastian/type Upgraded 2.3.4 3.2.1
sirbrillig/phpcs-variable-analysis Upgraded v2.11.2 v2.13.0
squizlabs/php_codesniffer Upgraded 3.6.2 3.13.5
symfony/console Upgraded v5.4.1 v5.4.47
symfony/deprecation-contracts Upgraded v3.0.0 v3.7.0
symfony/polyfill-ctype Upgraded v1.23.0 v1.37.0
symfony/polyfill-intl-grapheme Upgraded v1.23.1 v1.37.0
symfony/polyfill-intl-normalizer Upgraded v1.23.0 v1.37.0
symfony/polyfill-mbstring Upgraded v1.23.1 v1.37.0
symfony/polyfill-php73 Upgraded v1.23.0 v1.37.0
symfony/polyfill-php80 Upgraded v1.23.1 v1.37.0
symfony/service-contracts Upgraded v2.4.1 v3.7.0
symfony/string Upgraded v6.0.1 v6.4.39
theseer/tokenizer Upgraded 1.2.1 1.3.1
wp-coding-standards/wpcs Upgraded 2.3.0 3.3.0
phpdocumentor/reflection-common Removed 2.2.0 -
phpdocumentor/reflection-docblock Removed 5.3.0 -
phpdocumentor/type-resolver Removed 1.5.1 -
phpspec/prophecy Removed v1.15.0 -
webmozart/assert Removed 1.10.0 -

@mmatiasautio mmatiasautio merged commit 99a0c33 into master May 15, 2026
2 checks passed
@mmatiasautio mmatiasautio deleted the copilot/update-plugin-to-php-8-3 branch May 15, 2026 07:44
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.

3 participants