NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #4137 most downloaded on Packagist
The Queue plugin for CakePHP provides deferred task execution.
Latest stable
8.18.0
Last release 18 days ago
03 Nov 2026
Release timing varies
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
139 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
A deadlock or lock wait timeout while saving a job's completion no longer kills the worker and leaves the executed job unconfirmed. markJobDone() retr
markJobDone() retries the save up to three times, and if it still fails the worker logs that the job may run again, skips Queue.Job.completed and keeps running. #523 #524FOR UPDATE SKIP LOCKED on MySQL 8.0.1+, MariaDB 10.6+ and PostgreSQL 9.5+, which reduces lock contention between workers. Controlled by the new Queue.skipLocked key (null detects, true forces, false keeps plain FOR UPDATE). #524SKIP LOCKED is on by default. Under contention a worker may take the next eligible job instead of waiting for a row another worker is reserving, so strict priority order can loosen briefly. Set Queue.skipLocked to false to keep the previous locking. #524Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.17.0...8.18.0
Admin: a redirect or other response from the host AppController::beforeFilter(), or one set on the event by a listener, is returned instead of being o
AppController::beforeFilter(), or one set on the event by a listener, is returned instead of being overridden by the access gate. #518 #519Queue.standalone) no longer runs the host AppController::beforeFilter() or other host controller callbacks. #518Queue.Execute instead of an unresolvable Execute task. #518job command and the worker use the connection configured in Queue.connection instead of assuming default, and an explicit --connection default is applied. #521Queue.workerLifetime nor Queue.workermaxruntime is set, instead of throwing a RuntimeException. #521QueuedJobsTable::getFailedStatus() no longer fails on a job without job_task. #521--connection to queue add, queue info and queue worker, matching queue run and queue job. #521Queue\Queue\Config::resolveConnection() as the single place that resolves and validates a queue connection. #521resources/locales/queue.pot. #522Queue.connections, the queue tables now default to the first entry, also outside the commands. Queue.connection only applies in single-connection mode. Review both keys if you relied on different defaults. #521Queue.standalone and relied on your AppController::beforeFilter() running for the queue admin, move that logic into Queue.adminAccess or middleware. #518Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.16.0...8.17.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Queued mails were sent with an empty body: EmailTask set the bodies from the payload, then Mailer::deliver('') re-rendered over them. SimpleQueueTrans
EmailTask set the bodies from the payload, then Mailer::deliver('') re-rendered over them. SimpleQueueTransport payloads also lost headers, attachments and the configured transport (#515).queue job reset all) re-queued running jobs, so a second worker ran them again. Only failed and aborted jobs are reset now (#515).createJob() with unique no longer dedupes against an aborted job (#515).Queue.workerPhpTimeout is honored. queue worker kill works in multiserver mode, and queue worker end all handles several workers sharing PID 1 (#515)./\host, and job edits are limited to notbefore and priority (#515).config/app.example.php referenced the removed Cake\Mailer\Email class (#515).Queue.adminDetailsLimit and is hidden while no job is aborted. New on QueuedJobsTable: getAbortedStats() and getAbortedCount() (#514).Queue.cleanupAbortedTimeout lets the cleanup remove aborted jobs (default 0 keeps them), queue job flush --aborted deletes them, and the dashboard card has a "Reset All" button. queue info shows the aborted count, and queue info --format json prints job counts, workers and statistics for monitoring (#516).Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.15.1...8.16.0
Truncate failure_message and captured output to the column size before saving. A failure larger than the TEXT column (e.g. a DB error echoing a huge q
failure_message and captured output to the column size before saving. A failure larger than the TEXT column (e.g. a DB error echoing a huge query) made the save throw, crashing the worker while recording the failure - the job got stuck and the queue stalled.Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.15.0...8.15.1
Persist a terminal aborted status so dead jobs stop counting as queued. Once a job exhausted its retries it kept completed IS NULL forever, so isQueue
aborted status so dead jobs stop counting as queued. Once a job exhausted its retries it kept completed IS NULL forever, so isQueued() and the admin "in_progress" filter still counted it — wedging non-concurrent callers (e.g. a QueueScheduler row) behind the dead job and rendering it as "Running". The Processor now stamps QueuedJobsTable::STATUS_ABORTED (via the new markJobAborted()) when getFailedStatus() is terminal; isQueued() and the in_progress filter exclude aborted rows, and the status badge renders them as "Failed". Retryable failures are untouched and null/other statuses are unaffected, so the change is backward compatible (#504).createJob() now targets dereuromark/cakephp-dto v3, whose FromArrayToArrayInterface moved to the PhpCollective\Dto\Dto namespace. The interface check is guarded by interface_exists() and still falls back to any object exposing toArray(), so plain arrays and non-DTO objects are unaffected. The dev requirement moves to ^3.0.0 and a conflict with dereuromark/cakephp-dto <3.0.0 is declared, so the plugin can no longer be paired with the old DTO major (#502).Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.14.0...8.15.0
QueueProcessesTable::add() now evicts stale (pid, server) rows whose heartbeat is older than the new Queue.staleHeartbeatThreshold (default 90s) befor
QueueProcessesTable::add() now evicts stale (pid, server) rows whose heartbeat is older than the new Queue.staleHeartbeatThreshold (default 90s) before inserting, fixing the worker crash-loop on containerized deployments (Docker/FrankenPHP). When the killed worker's row survived and the new worker tried to register with the same recycled PID, the unique-index collision threw a QueryException that the existing PersistenceFailedException catch in Processor::run() didn't handle (#493).--verbose is set, so a worker waiting for jobs no longer floods stdout/log with "Looking for Job …" / "nothing to do, sleeping." lines on every loop iteration (#491).Processor::captureOutput() no longer caches the schema check for the lifetime of the worker. A long-running worker started before bin/cake migrations migrate added the output column to queued_jobs would see the cached false for the rest of its runtime and silently drop captured stdout until restart. Explicit Queue.captureOutput config is still memoised (that branch never changes mid-process); auto-detect now re-checks per call (#496).ExecuteTask::add() no longer mangles quoted command paths with embedded spaces. explode(' ', ...) split "/usr/local/bin/My Tool" arg1 across command and params[0]; switched to str_getcsv with space delimiter so quoted paths survive intact. The plain cmd arg1 arg2 shape continues to work unchanged (#496).QueueController::index() caps the rendered pending/scheduled lists at Queue.adminDetailsLimit (default 200) to avoid OOM on realistic backlogs. With thousands of pending or failed-and-retried rows the dashboard previously crashed via DebugKit's Variables panel serialising every view variable. Aggregate counts on the tiles keep reflecting the true totals; truncated lists get a "Showing N most recent of M" notice with a pre-filtered link to the QueuedJobs admin (#497).New --force (-f) option on bin/cake queue worker clean wipes every queue_processes row regardless of the heartbeat threshold (#492). Recovery path for the same container-restart scenario above when an operator wants a one-shot manual reset.
Queue.adminBackUrl (with optional Queue.adminBackLabel) makes the admin layout's "Back to App" header link configurable, so installations can point users back to a non-default app URL. Mirrors the same pattern used by cakephp-audit-stash, cakephp-bouncer and cakephp-databaselog.
workerkey is now the canonical worker identity in queue_processes (#494). The unique (pid, server) index has been dropped (re-added as a non-unique index for query performance) because PID is not a stable identity — the OS recycles low PIDs across container restarts. update(), remove(), and endProcess() look up by workerkey (already uniquely indexed); when multiple rows share a PID, the most recently heartbeated row is targeted. Migration required: run bin/cake migrations migrate -p Queue.
createJob() gains an opt-in unique option that dedups fan-out enqueues against the existing reference-keyed pending job (#498). First call inserts as usual; subsequent calls while the original is still pending return the existing entity without inserting. Once it completes, the next call inserts a fresh row, so scheduled re-runs continue to enqueue normally. Requires reference to be set (throws InvalidArgumentException otherwise); default is false so existing callers are unchanged.
$queuedJobsTable->createJob(
'VolunteerCheckOutReminder',
['account_uuid' => $accountUuid],
[
'reference' => 'volunteer_check_out:' . $accountUuid,
'unique' => true,
],
);
Admin dashboard banner gains a red Queue Stalled state for "action required" signaling (#499). Triggers when the last heartbeat is older than Queue.dashboardStalledAfter (default 120s) with a pending backlog and no in-flight job, or when no worker has reported at all and there's a pending backlog or a stuck fetched job. The existing green Queue Running and yellow Queue Idle states are unchanged. When red, the banner expands with a diagnostic grid (last activity, workers/servers, pending count) and a one-line cause hint. Two new config keys: Queue.dashboardIdleAfter (60s default), Queue.dashboardStalledAfter (120s default).
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.13.0...8.14.0
`Queue.executeAllowedCommands` is now required when `debug=false` for any deployment that runs Queue.Execute jobs (#485). With the key unset or empty
Queue.executeAllowedCommands is now required when debug=false for any deployment that runs Queue.Execute jobs (#485). With the key unset or empty in production, every Execute job is rejected before exec() is invoked. Migration — add to config/app.php (or app_local.php):
'Queue' => [
'executeAllowedCommands' => [
'bin/cake',
// '/usr/bin/php',
],
],
In dev (debug=true) the allow-list is ignored, so local environments are unaffected. See config/app.example.php and docs/sections/tasks/execute.md.
ExecuteTask now escapes the command and each params entry per token via escapeshellarg() instead of escapeshellcmd() (#485). Each value is wrapped as a single shell argument, which closes argument-injection paths but means callers that previously packed multiple tokens into a single entry must split them across the array. Migration:
// before
['command' => 'bin/cake importer run', 'params' => ['--limit 10']]
// after
['command' => 'bin/cake', 'params' => ['importer', 'run', '--limit', '10']]
See docs/sections/upgrading.md for the full note.
EmailTask::run() now restricts unserialize() to the configured Message subclass via allowed_classes, closing a gadget-chain risk on legacy raw-serialized settings (#484). Modern array-path callers using EmailTask::serialize() are unaffected.escapeTitle instead of the broader escape so URL/class/title attributes stay HTML-escaped while the title text can still carry icon markup (#483).Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.12.0...8.13.0
Queue.adminAccess is now required to access the admin backend at /admin/queue/.... The host application MUST set it to a Closure that returns literal
Queue.adminAccess is now required to access the admin backend at /admin/queue/.... The host application MUST set it to a Closure that returns literal true to grant access — anything else (unset, non-Closure, returns false, returns a truthy non-bool, throws) yields a 403. The admin UI can trigger jobs (via AddFromBackendInterface tasks), reset / remove queued jobs, and terminate workers; accidental exposure is harmful, so the default policy is now deny.
Migration — add to config/bootstrap.php:
use Cake\Core\Configure;
use Cake\Http\ServerRequest;
Configure::write('Queue.adminAccess', function (ServerRequest $request): bool {
$identity = $request->getAttribute('identity');
return $identity !== null && in_array('admin', (array)$identity->roles, true);
});
See docs/sections/admin_dashboard.md for the Authorization subsection. adminAccess is independent of Queue.standalone — the gate runs in both modes.
queue_processes rows on worker startup (#480) — workers now clear orphan rows on launch instead of leaving them around for the timeout sweep.Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.11.0...8.12.0
Fix Queue::addJob() silently no-op'ing when a task's run() did not actually queue a job. The return value now reliably reflects whether a job was crea
Queue::addJob() silently no-op'ing when a task's run() did not actually queue a job. The return value now reliably reflects whether a job was created. (#478)Queue.workerLifetimeJitter config option to stagger worker shutdowns and avoid thundering-herd restarts when many workers are spawned together. (#476)<script> blocks now use nonces and inline onclick handlers were removed. (#477)style attribute to a CSS class so the admin UI works under strict CSP. (#479)Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.10.2...8.11.0
Fix EmailTask calling undefined methods on Mailer/Message when queued payloads contained keys from a serialized Cake\Mailer\Message (htmlMessage, text
EmailTask calling undefined methods on Mailer/Message when queued payloads contained keys from a serialized Cake\Mailer\Message (htmlMessage, textMessage, appCharset). These are now routed to the correct Message setters (setBodyHtml, setBodyText, setCharset fallback). (#474, fixes #473)EmailTask throwing Unknown named parameter when settings.headers or the readReceipt address setting was an associative map. (#474)Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.10.1...8.10.2
Fix EmailTask throwing Unknown named parameter on PHP 8+ when queued payloads used CakePHP's associative ['email' => 'Name'] address-map format for to
EmailTask throwing Unknown named parameter on PHP 8+ when queued payloads used CakePHP's associative ['email' => 'Name'] address-map format for to, from, cc, bcc, or replyTo. Previously-working payload formats (string, ['email', 'Name'] tuple, legacy wrapped [['email' => 'Name']]) are unchanged. (#472, fixes #471)Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.10.0...8.10.1
This release introduces a modern, self-contained admin dashboard for the Queue plugin that is completely isolated from the host application's CSS/JS.
This release introduces a modern, self-contained admin dashboard for the Queue plugin that is completely isolated from the host application's CSS/JS.
QueueAppController) that extends Cake\Controller\Controller directly'Queue' => [
// Layout for admin pages:
// - null (default): Uses 'Queue.queue' isolated Bootstrap 5 layout
// - false: Disables plugin layout, uses app's default layout
// - string: Uses specified layout
'adminLayout' => null,
// Auto-refresh dashboard every N seconds (0 = disabled)
'dashboardAutoRefresh' => 30,
],
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.9.1...8.10.0
<img width="1229" height="924" alt="dashboard_queue" src="https://github.com/user-attachments/assets/df62866a-aaaa-4289-abf1-2a62db784038" />
Fixed hidden dependency on Tools plugin in admin templates by adding runtime fallbacks for relLengthOfTime() (falls back to CakePHP's timeAgoInWords()
relLengthOfTime() (falls back to CakePHP's timeAgoInWords()) and Format->ok() (uses element with fallback)JsonableBehavior by adding local ArrayType classFull Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.9.0...8.9.1
Add optional output capture for queue jobs
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.8.0...8.9.0
Add Queue.Job.* lifecycle events with optional Sentry bridge
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.7.0...8.8.0
Make Icon configuration optional with text fallback, allows to have dereuromark/templating and icons fully optional.
dereuromark/templating and icons fully optional.Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.6.2...8.7.0
Added support for unified cake_migrations table - https://github.com/dereuromark/cakephp-queue/pull/450
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.6.1...8.6.2
Prevent errors in opcode cache mode.
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.6.0...8.6.1
Removed deprecated searchManager() method in favor of filter collection class
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.5.2...8.6.0
### Fixed - Removed deprecations Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.5.1...8.5.2
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.5.1...8.5.2
Re-allowed 0 (unlimited) runtime for workers again
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.5.0...8.5.1
Allow attachments for Email task
Queue.Job.maxAttemptsExhausted event when a job has failed and exhausted all of its configured retry attempts.
@Txxkirsch made their first contribution in https://github.com/dereuromark/cakephp-queue/pull/435
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/8.3.0...8.3.1
Allow cloning of run jobs to re-run them from backend (job view)
-r from local dev CLI command to run a longer queue job in the backgroundNote: Make sure your Queue.workermaxruntime is always set to the absolute max your queue jobs will ever run. This is now a bit more strictly implemented, to avoid some rogue long running tasks to take too much processing time.
### Fixes - Removed deprecations
Fixed some minor Windows compatibility issue
Compatibility with brick/varexporter 0.6+
### Fixes - Return Tasks as sorted list
Fixed payload data edit functionality
Included commits: https://github.com/dereuromark/cakephp-queue/compare/8.1.0...8.1.1
Removed deprecations
Included commits: https://github.com/dereuromark/cakephp-queue/compare/8.1.0...8.1.1
Update brick/varexporter dependency to allow for v0.5 ("brick/varexporter": "^0.4.0 || ^0.5.0")
"brick/varexporter": "^0.4.0 || ^0.5.0")Included commits: https://github.com/dereuromark/cakephp-queue/compare/8.0.0...8.1.0
Also make sure that you are not using deprecated serialize/unserialize, as now everything is using JSON.
This new major ships with a few improvements:
$data param of createJob()$options param of createJob()So make sure that you migrated away from passing whole serialized objects in your payload in favor of ->toArray() or "JSON string" representation - which also can build up the object afterward again inside the run() method.
It usually also decreases DB row size and is safer around code upgrade deployment (serialized objects often break here after the slightest change).
For more info on changes coming from v7 see included upgrade guide in docs/ folder.
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/7.2.2...8.0.0
This new v8 major contains some cleanup. It is more internal, so most apps will not have to change a single line.
This new v8 major contains some cleanup. It is more internal, so most apps will not have to change a single line.
For more info on changes coming from v7 see included upgrade guide in docs/ folder.
Please test and give feedback so we can release v8 stable next week.
Add generic type hint + helpful exception for ServicesTrait
Add generic type hint + helpful exception for ServicesTrait
Make sure Migrations work for mssql.
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/7.2.1...7.2.2
Fixed up custom finder signature for PHPStan
Fixed up custom finder signature for PHPStan
Add status field queued_jobs to search by @LordSimal in https://github.com/dereuromark/cakephp-queue/pull/399
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/7.1.3...7.2.0
Fixed migration file for Postgres.
Fixed migration file for Postgres.
Fixed icon in template for new Templating plugin support.
Fixed icon in template for new Templating plugin support.
### Fixes Fixed migration version.
Fixed migration version.
Added index to QueuedJobs table columns to make performance much faster with many records.
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/7.0.1...7.1.0
Fixed backend controller actions.
Fixed backend controller actions.
QueuedJob.failed is now attempts. Make sure to run the migration for it.
Main changes:
Please test - once confirmed to be all good, we can tag stable release.
For CakePHP 5.0+ apps.
Please test - once confirmed to be all good, we can tag stable release.
Fixed MysqlAdapter check in Utf8mb4Fix migration by @GustavoPeixoto in https://github.com/dereuromark/cakephp-queue/pull/442
Full Changelog: https://github.com/dereuromark/cakephp-queue/compare/6.9.2...6.9.3
### Fixes Backporting fixes
Backporting fixes
### Fixes Fixed migration version.
Fixed migration version.
Added index to QueuedJobs table columns to make performance much faster with many records.
Added index to QueuedJobs table columns to make performance much faster with many records.
### Improvements - Removed deprecations Note: CakePHP 4.4+ now
Note: CakePHP 4.4+ now
Expose kill signal parameter in controller
Fixed TaskFinder failing to find tasks if app directory is not src/.
src/.Allow creating tasks in sub folders/namespaces. So far it was only possible to have tasks on one single level. You can now use My/Sub/MyTaskNameTask t
Allow creating tasks in sub folders/namespaces.
So far it was only possible to have tasks on one single level.
You can now use My/Sub/MyTaskNameTask to create tasks in sub-namespace Task\My\Sub\.
E.g. src/Queue/Task/My/Sub/{YourNameForIt}Task.php would be found and used as My/Sub/{YourNameForIt}.
Added shim to transform serialized data for object to JSON switch as button in backend.
add() method for AddFromBackendInterface interface functionality for backend button.Display duration of each job in the job overview.
Added same JSON safe strategy for EmailTask and deprecated the object ways here only to be used with legacy ObjectSerializer. `php $data = [ 'class' =…
Allow configuration of serializing strategy:
serialize()json_encode()SerializerInterface'Queue' => [
...
'serializerClass' => \Queue\Utility\JsonSerializer::class,
'serializerConfig' => [...],
],
Added new MailerTask specifically for sending reusable emails using Mailer objects, but without passing through actual objects.
Instead, the class string (FQCN) is passed only together with config.
This allows it to work with JSON strategy and even in between updates of the server (as passed objects could fail to be "unserialized").
$data = [
'class' => TestMailer::class,
'action' => 'testAction',
'vars' => [...],
];
$queuedJobsTable->createJob('Queue.Mailer', $data);
Added same JSON safe strategy for EmailTask and deprecated the object ways here only to be used with legacy ObjectSerializer.
$data = [
'class' => Message::class,
'settings' => $settings,
];
$queuedJobsTable->createJob('Queue.Email', $data);
The benefit of JSON serializing is:
Added AddFromBackendInterface to allow listing only possible tasks in GUI. Some tasks that can be added (implementing AddInterface) require arguments
Added AddFromBackendInterface to allow listing only possible tasks in GUI.
Some tasks that can be added (implementing AddInterface) require arguments and can as such only be executed from CLI.
With the new interface, this can now be differentiated.
Fixed Migration OldTaskFinder for upgrading from v5 to v6.
Fixed Migration OldTaskFinder for upgrading from v5 to v6.
Removed deprecation introduced in 6.4.2
Removed deprecation introduced in 6.4.2
Fixed markJobDone() to add valid 1 (100%) value and added validation for expected 0...1 range.
Fixed markJobDone() to add valid 1 (100%) value and added validation for expected 0...1 range.
One column per quarter.