PHPackages                             juanparati/laravel-sync-workflow - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. juanparati/laravel-sync-workflow

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

juanparati/laravel-sync-workflow
================================

A library for executing synchronous workflows in Laravel

1.1(1mo ago)2545↓50%MITPHPPHP &gt;=8.3CI passing

Since Aug 29Pushed 1mo agoCompare

[ Source](https://github.com/juanparati/laravel-sync-workflow)[ Packagist](https://packagist.org/packages/juanparati/laravel-sync-workflow)[ RSS](/packages/juanparati-laravel-sync-workflow/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (10)Versions (5)Used By (0)

[![test](https://github.com/juanparati/laravel-sync-workflow/actions/workflows/on_push.yml/badge.svg)](https://github.com/juanparati/laravel-sync-workflow/actions/workflows/on_push.yml/badge.svg)

Laravel Synchronous Workflows
=============================

[](#laravel-synchronous-workflows)

A robust library for executing reproducible synchronous workflows with seamless event sourcing capabilities in Laravel.

Workflow activities are executed sequentially within a single process and are not distributed across multiple instances or jobs.

Each time that an activity is executed, its input is passed to the next activity in the workflow, and objects are decoupled from their original reference to avoid non-desired mutability.

For distributed asynchronous workflows, see [Laravel Workflow](https://github.com/laravel-workflow/laravel-workflow).

Key features include:

- Synchronous workflow execution
- Event sourcing capabilities
- Comprehensive workflow history tracking
- Workflow replay functionality
- Automatic object reference decoupling
- Relative time management
- Unique workflow locking
- Controlled exceptions for graceful workflow halting

This library is inspired by [Laravel Workflow](https://github.com/laravel-workflow/laravel-workflow) and [Laravel Saga](https://github.com/laravel-sagas/laravel-sagas).

Installation
------------

[](#installation)

```
composer require juanparati/laravel-sync-workflow
```

Publish migrations and configuration files (required for event sourcing):

```
artisan vendor:publish --tag=laravel-sync-workflow
```

Run migrations:

```
artisan migrate
```

Usage
-----

[](#usage)

### Basic Workflow Example

[](#basic-workflow-example)

Here's a simple workflow that processes user registration:

```
