PHPackages                             serverlessworkflow/sdk - 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. [API Development](/categories/api)
4. /
5. serverlessworkflow/sdk

ActiveLibrary[API Development](/categories/api)

serverlessworkflow/sdk
======================

Provides the PHP API/SPI for the Serverless Workflow Specification.

1.0.0(2y ago)931Apache-2.0PHP

Since Nov 25Pushed 2y ago3 watchersCompare

[ Source](https://github.com/serverlessworkflow/sdk-php)[ Packagist](https://packagist.org/packages/serverlessworkflow/sdk)[ RSS](/packages/serverlessworkflow-sdk/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

Serverless Workflow Specification - PHP SDK
===========================================

[](#serverless-workflow-specification---php-sdk)

Provides the PHP API/SPI for the [Serverless Workflow Specification](https://github.com/serverlessworkflow/specification).

With the SDK you can:

- Programmatically build workflow definitions
- Parse workflow JSON and YAML definitions
- Validate workflow definitions

### Status

[](#status)

Current SDK version conforms to the [Serverless Workflow specification v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x).

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

[](#installation)

```
composer install serverlessworkflow/sdk
```

Build
-----

[](#build)

```
use Serverless\Workflow\Action;
use Serverless\Workflow\ActionDataFilter;
use Serverless\Workflow\FunctionDef;
use Serverless\Workflow\FunctionRef;
use Serverless\Workflow\OperationState;
use Serverless\Workflow\Workflow;

$workflow = new Workflow([
    'id' => 'greeting',
    'name' => 'Greeting Workflow',
    'description' => 'Greet Someone',
    'version' => '1.0',
    'specVersion' => '0.8',
    'start' => 'Greet',
    'states' => [
        new OperationState([
            'name' => 'Greet',
            'type' => 'operation',
            'actions' => [
                new Action([
                    'functionRef' => new FunctionRef([
                        'refName' => 'greetingFunction',
                        'arguments' => [
                            'name' => '${ .person.name }',
                        ],
                    ]),
                    'actionDataFilter' => new ActionDataFilter([
                        'results' => '${ .greeting }',
                    ]),
                ]),
            ],
            'end' => true,
        ]),
    ],
    'functions' => [
        new FunctionDef([
            'name' => 'greetingFunction',
            'operation' => 'file://myapis/greetingapis.json#greeting',
        ]),
    ],
]);
```

Parse
-----

[](#parse)

### Convert from JSON/YAML source

[](#convert-from-jsonyaml-source)

```
$workflow = Workflow::fromJson(file_get_contents('workflow.json'));

$workflow = Workflow::fromYaml(file_get_contents('workflow.yaml'));
```

### Convert to JSON/YAML

[](#convert-to-jsonyaml)

```
$json = $workflow->toJson();

$yaml = $workflow->toYaml();
```

Validate
--------

[](#validate)

```
use Serverless\Workflow\WorkflowValidator;

WorkflowValidator::validate($workflow);
```

The `validate` method will raise an exception if the provided workflow does not comply with the specification.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

951d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1130888?v=4)[Richard McDaniel](/maintainers/rmcdaniel)[@rmcdaniel](https://github.com/rmcdaniel)

---

Top Contributors

[![rmcdaniel](https://avatars.githubusercontent.com/u/1130888?v=4)](https://github.com/rmcdaniel "rmcdaniel (5 commits)")[![cdavernas](https://avatars.githubusercontent.com/u/16137162?v=4)](https://github.com/cdavernas "cdavernas (4 commits)")

---

Tags

cncfphpsdkserverlessserverless-workflowworkflow

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/serverlessworkflow-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/serverlessworkflow-sdk/health.svg)](https://phpackages.com/packages/serverlessworkflow-sdk)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
