Skip to content

feat!: queue through the drivers of pollora/schedule - #19

Merged
ogorzalka merged 1 commit into
mainfrom
feat/schedule-package
Oct 13, 2026
Merged

ogorzalka merged 1 commit into
mainfrom
feat/schedule-package

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

pollora/hook 2.0, step 4 of the pollora/schedule plan.

WP-Cron and Action Scheduler are the drivers of pollora/schedule (v0.1.2, required). Async\Drivers\ScheduledDriver queues through them and keeps what is the hook's own: the message an event carries and where the payload lives. Async\Recovery is the daily task that was WpCronDriver::recover().

Breaking

Async\Drivers\WpCronDriver and ActionSchedulerDriver are removed, with no alias (the framework does not use them). WpCronDriver::handles()/claim() are PayloadStore's; the recovery constants and methods are Recovery's.

Unchanged

->async(), #[Async], Async::fake(), via() and their options; the hook pollora/async/run, the Action Scheduler groups (pollora or the queue name), identifier-only WP-Cron events and the pollora_async_ options. Work queued by 1.x runs once 2.0 is installed: tested on a real WordPress (an event with its option, an action in pollora, one in crm, queued under 1.4.1, run under 2.0).

Worth knowing

  • Async::listen() keeps pollora/async/run and pollora/async/recover on WP-Cron through the pollora/schedule/protected_hooks filter, so via('wp-cron') still means WP-Cron when the site gave pollora/schedule another driver. Checked live with the site on Action Scheduler.
  • Hook actions live in their own groups and never reach pollora/schedule's cron index (which follows its default group only): the index would otherwise drop them as stale.
  • available() also waits for Action Scheduler to be initialised, so auto still falls back to WP-Cron before action_scheduler_init.
  • The package now requires pollora/schedule, hence pollora/discovery (illuminate/collections, spatie/php-structure-discoverer), pollora/attributes, abilities and ajax.

264 tests, PHPStan clean.

WP-Cron and Action Scheduler are the drivers of pollora/schedule, which the
package now requires. ScheduledDriver keeps what is the hook's own, and
Recovery the daily task. Work queued by 1.x runs unchanged. Async\Drivers\WpCronDriver
and ActionSchedulerDriver are removed, with no alias.
@ogorzalka
ogorzalka merged commit 1349c3d into main Oct 13, 2026
5 checks passed
@ogorzalka
ogorzalka deleted the feat/schedule-package branch October 13, 2026 13:45
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.

1 participant