Skip to content

v1.4.0

Choose a tag to compare

@ogorzalka ogorzalka released this 07 Oct 15:35
· 109 commits to main since this release
5c59a09

Added

  • Async::setDefaults(): the attempts, backoff and asUser every asynchronous registration starts from. The framework sets them from config/hooks.php.
  • Async::injectParametersUsing(): handler parameters that are not hook arguments are injected at execution. By default, a parameter is injected when its type is a class or interface that does not travel as a hook argument (WordPress objects, enums, dates, JsonSerializable and AsyncContext do). These parameters are not requested from WordPress, so they can sit anywhere in the signature. The framework resolves them from its container.
  • Async::receive(..., throwOnFinalFailure: true): the last failure is announced through pollora/async/failed, then thrown instead of reported, for a driver whose queue records failures itself (a Laravel job then lands in failed_jobs). Retries still happen while attempts are left.

Changed

  • A handler parameter with no hook argument left takes its default value, so a later AsyncContext or injected parameter still gets its own.

Full Changelog: v1.3.0...v1.4.0