Skip to main content
Version: 2.x

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.2 or later in the supported PHP 8.x line
  • Laravel 12.69 or later in 12.x, or Laravel 13.30 or later in 13.x
  • PHP 8.3 or later for Laravel 13

These requirements apply to the current embedded release. For an older application, choose the appropriate published support line before updating Composer. The bare service-mode PHP SDK has its own requirements.

Check Database Compatibility for the embedded and Server declarations, exact tested configurations and qualification limits.

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:

composer require durable-workflow/workflow:2.21.0

Composer pins the published embedded release above. Review the Laravel support and upgrade boundary before widening that constraint or upgrading an older Laravel application.

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.