xepozz/yii3-temporal-bridge

There is no license information available for the latest version (dev-master) of this package.

dev-master 2024-12-12 17:08 UTC

This package is auto-updated.

Last update: 2024-12-12 17:10:36 UTC


README

Bridge package to use Temporal with Yii3 easily.

Latest Stable Version Total Downloads phpunit codecov

Installation

composer require xepozz/yii3-temporal-bridge

Usage

Basic concept

Use yiisoft/classifier package to automatically register workflows and activities.

Add tag temporal.workflow for each new workflow and temporal.activity for each new activity.

Example how to configure workflows and activities via tags near the class definition:

return [
    // ...
    \App\Temporal\Workflow\LongWorkflow::class => [
        '__construct()' => [
            'param' => 'value',
            // ...
        ],
        'tags' => ['temporal.workflow'], // Add this line
    ],
    
    \App\Temporal\Activity\CommonActivity::class => [
        'tags' => ['temporal.activity'], // Add this line
    ],
];