Skip to content

v3.0.0

Latest

Choose a tag to compare

@hschimpf hschimpf released this 04 Jul 20:46
f9d311b

What's Changed

🚀 Highlights

  • Requires PHP 8.2+ – leverages readonly properties, promoted params, improved typing.
  • New exception hierarchy (*Exception.php) + ParallelException DTO.
  • Refactored Scheduler, Runner, Task for stricter types and cleaner error propagation.
  • GitHub Actions now test on 8.2 · 8.3 · 8.4.

⚠️ Breaking Change

Raising the minimum runtime from 8.0 to 8.2 is a SemVer-major change.
Projects on older PHP versions must stay on the 2.x line.

🆕 Added

  • Domain-specific exceptions:
    ActionNotImplementedException, InvalidMessageReceivedException, NoWorkerDefinedException,
    WorkerAlreadyDefinedException, WorkerNotDefinedException, TaskExecutionFailedException.
  • ParallelException object to serialise worker-side throwables.
  • Modern PHP 8.2 syntax throughout (readonly props, precise return types).

🔄 Changed

  • Scheduler::using() now throws WorkerAlreadyDefinedException when attempting to re-register a worker with constructor args.
  • Scheduler::runTask() surfaces worker errors via TaskExecutionFailedException.
  • Numerous PSR-12 / coding-style fixes and micro-optimisations.

🗑 Removed

  • CI workflows for PHP 8.0 / 8.1.
  • Generic RuntimeException branches – replaced by specific exceptions.

🧭 Upgrade Guide

  1. Ensure your runtime is PHP 8.2+ with ZTS and parallel ≥ 1.2.5 installed.
  2. Update composer constraint to "hds-solutions/parallel-sdk": "^3.0".
  3. Replace any catch (RuntimeException) blocks for task failures with catch (TaskExecutionFailedException).
  4. Avoid re-registering workers with new ctor args; if needed, call Scheduler::removeAllTasks() first.

Full Changelog: v2.1.4...v3.0.0