Update plugin to be compatible with PHP 8.3#9
Conversation
- 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>
| }, | ||
| "require": { | ||
| "php": "^7.4 || ^8.0 || ^8.1", | ||
| "php": "^7.4 || ^8.0", |
There was a problem hiding this comment.
Tästä voisi oikeastaan jo poistaa 7.4 eli pelkästään ^8.0
There was a problem hiding this comment.
Done in 02a7c2b — PHP requirement is now ^8.0 only.
| }, | ||
| "require-dev": { | ||
| "roave/security-advisories": "dev-latest", | ||
| "devgeniem/geniem-rules-codesniffer": "^1", |
There was a problem hiding this comment.
Eikö tää ja lint-skripti kannattaisi säilyttää? Vai miksei voi käyttää?
There was a problem hiding this comment.
Restored in 02a7c2b — devgeniem/geniem-rules-codesniffer, brainmaestro/composer-git-hooks, lint scripts, and pre-commit hooks are all back.
|
@copilot Apply these chnages to the current branch |
Agent-Logs-Url: https://github.com/devgeniem/wp-queue/sessions/55b9cab6-cc22-444b-81fa-2b16400bde56 Co-authored-by: mmatiasautio <130443809+mmatiasautio@users.noreply.github.com>
|
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:
If you need me to access, download, or install something from one of these locations, you can either:
|
Composer package changes
|
The plugin's dependencies and method signatures were incompatible with PHP 8.3.
Changes
^7.4 || ^8.0 || ^8.1→^8.0(drops PHP 7.4, covers all 8.x)QueueInterfacedeclared non-nullable params forset_entries,set_entry_handler,set_entry_fetcherbut implementations used nullable types — generates deprecation notices in PHP 8.3predis 2.0.x-dev→^2.0,phpunit ^9→^9.6,m6web/redis-mock ^5→^5.6) to PHP 8.3-compatible versions while retainingdevgeniem/geniem-rules-codesnifferandbrainmaestro/composer-git-hooksBase::set_entries()andMockQueue::set_entries()now handle null input correctlyInterface fix example
All 11 tests pass on PHP 8.3 with zero deprecation notices.