{"id":31821376,"url":"https://github.com/serverlessworkflow/sdk-php","last_synced_at":"2025-10-11T13:24:10.079Z","repository":{"id":208711335,"uuid":"722212436","full_name":"serverlessworkflow/sdk-php","owner":"serverlessworkflow","description":"PHP SDK for Serverless Workflow","archived":false,"fork":false,"pushed_at":"2023-11-25T17:08:03.000Z","size":61,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-19T02:26:05.115Z","etag":null,"topics":["cncf","php","sdk","serverless","serverless-workflow","workflow"],"latest_commit_sha":null,"homepage":"https://serverlessworkflow.io/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serverlessworkflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-22T17:14:26.000Z","updated_at":"2025-04-01T13:32:22.000Z","dependencies_parsed_at":"2023-11-25T17:46:32.083Z","dependency_job_id":null,"html_url":"https://github.com/serverlessworkflow/sdk-php","commit_stats":null,"previous_names":["serverlessworkflow/sdk-php"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/serverlessworkflow/sdk-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverlessworkflow%2Fsdk-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverlessworkflow%2Fsdk-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverlessworkflow%2Fsdk-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverlessworkflow%2Fsdk-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverlessworkflow","download_url":"https://codeload.github.com/serverlessworkflow/sdk-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverlessworkflow%2Fsdk-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007325,"owners_count":26084280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cncf","php","sdk","serverless","serverless-workflow","workflow"],"created_at":"2025-10-11T13:24:09.144Z","updated_at":"2025-10-11T13:24:10.074Z","avatar_url":"https://github.com/serverlessworkflow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Workflow Specification - PHP SDK\n\nProvides the PHP API/SPI for the [Serverless Workflow Specification](https://github.com/serverlessworkflow/specification).\n\nWith the SDK you can:\n* Programmatically build workflow definitions \n* Parse workflow JSON and YAML definitions\n* Validate workflow definitions\n\n### Status\n\nCurrent SDK version conforms to the [Serverless Workflow specification v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x).\n\n\n## Installation\n\n```bash\ncomposer install serverlessworkflow/sdk\n```\n\n## Build \n\n```php\nuse Serverless\\Workflow\\Action;\nuse Serverless\\Workflow\\ActionDataFilter;\nuse Serverless\\Workflow\\FunctionDef;\nuse Serverless\\Workflow\\FunctionRef;\nuse Serverless\\Workflow\\OperationState;\nuse Serverless\\Workflow\\Workflow;\n\n$workflow = new Workflow([\n    'id' =\u003e 'greeting',\n    'name' =\u003e 'Greeting Workflow',\n    'description' =\u003e 'Greet Someone',\n    'version' =\u003e '1.0',\n    'specVersion' =\u003e '0.8',\n    'start' =\u003e 'Greet',\n    'states' =\u003e [\n        new OperationState([\n            'name' =\u003e 'Greet',\n            'type' =\u003e 'operation',\n            'actions' =\u003e [\n                new Action([\n                    'functionRef' =\u003e new FunctionRef([\n                        'refName' =\u003e 'greetingFunction',\n                        'arguments' =\u003e [\n                            'name' =\u003e '${ .person.name }',\n                        ],\n                    ]),\n                    'actionDataFilter' =\u003e new ActionDataFilter([\n                        'results' =\u003e '${ .greeting }',\n                    ]),\n                ]),\n            ],\n            'end' =\u003e true,\n        ]),\n    ],\n    'functions' =\u003e [\n        new FunctionDef([\n            'name' =\u003e 'greetingFunction',\n            'operation' =\u003e 'file://myapis/greetingapis.json#greeting',\n        ]),\n    ],\n]);\n```\n\n## Parse\n\n### Convert from JSON/YAML source\n\n```php\n$workflow = Workflow::fromJson(file_get_contents('workflow.json'));\n\n$workflow = Workflow::fromYaml(file_get_contents('workflow.yaml'));\n```\n\n### Convert to JSON/YAML\n\n```php\n$json = $workflow-\u003etoJson();\n\n$yaml = $workflow-\u003etoYaml();\n```\n\n## Validate\n\n```php\nuse Serverless\\Workflow\\WorkflowValidator;\n\nWorkflowValidator::validate($workflow);\n```\n\nThe `validate` method will raise an exception if the provided workflow does not comply with the specification.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverlessworkflow%2Fsdk-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverlessworkflow%2Fsdk-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverlessworkflow%2Fsdk-php/lists"}