Skip to main content
Version: 2.0

Installation

This guide covers installing the Durable Workflow PHP package for Laravel applications.

If you are deciding between package embedding and the standalone server, start with Deployment Modes. This page covers the embedded Laravel path.

Prefer to start from a working app? The Sample App is a runnable Laravel 13 project on Durable Workflow 2.0 with one workflow per pattern surface, a Codespaces flow, and a docker compose flow. Clone it, run php artisan app:init, and you have the same install applied for you. Come back here when you are ready to add Durable Workflow to your own Laravel application.

Requirements

  • PHP 8.1 or later
  • Laravel 9 or later

Durable Workflow can be used with any queue driver that Laravel supports (except the sync driver), including:

  • Amazon SQS
  • Beanstalkd
  • Database
  • Redis

Each queue driver has its own prerequisites.

Durable Workflow also requires a cache driver that supports locks.

Installing Durable Workflow

Durable Workflow is installable via Composer. Use the @alpha stability flag while 2.0 is in pre-release:

composer require durable-workflow/workflow:^2.0@alpha

Drop the @alpha once 2.0.0 is tagged stable on Packagist. See the compatibility and release-authority contract for the platform-wide stability rules; the @alpha Composer flag is the prerelease ramp for the workflow package's 2.0.0 cut and does not change the stability of any other published surface.

The package auto-loads its migrations, so a normal migrate run is enough after install:

php artisan migrate

Running Workers

Durable Workflow uses queues to run workflows and activities in the background. You will need to either run the queue:work command or use Horizon to run your queue workers. Without a queue worker, workflows and activities will not be processed. To run workflows and activities in parallel, you will need more than one queue worker.