PHPackages                             dereuromark/cakephp-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. dereuromark/cakephp-workflow

ActiveCakephp-plugin

dereuromark/cakephp-workflow
============================

State machine and workflow engine for CakePHP with PHP 8 Attributes, YAML support, and admin UI

029↑2900%PHPCI passing

Since Mar 28Pushed 1mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

CakePHP Workflow Plugin
=======================

[](#cakephp-workflow-plugin)

State machine and workflow engine for CakePHP with PHP 8 Attributes, YAML/NEON config support, and admin UI.

Requirements
------------

[](#requirements)

- PHP 8.2+
- CakePHP 5.2+

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

[](#installation)

```
composer require dereuromark/cakephp-workflow
```

Load the plugin in your `src/Application.php`:

```
public function bootstrap(): void
{
    parent::bootstrap();
    $this->addPlugin('Workflow');
}
```

Run migrations:

```
bin/cake migrations migrate --plugin Workflow
```

Configuration
-------------

[](#configuration)

Configure the plugin in your `config/app.php`:

```
'Workflow' => [
    'loader' => [
        'namespaces' => [
            'App\\Workflow',
        ],
        'configPath' => CONFIG . 'workflows' . DS,
    ],
    'logging' => true,
    'locking' => true,
    'timeouts' => true,
    'lockDuration' => 30,
],
```

Defining Workflows
------------------

[](#defining-workflows)

### Using PHP 8 Attributes (Recommended)

[](#using-php-8-attributes-recommended)

Create state classes in your namespace:

```
