polysource/workflow-bridge
最新稳定版本:v0.1.3
Composer 安装命令:
composer require polysource/workflow-bridge
包简介
Polysource — Symfony Workflow bridge: auto-generates inline transition actions + state chips for resources with a Workflow attached.
README 文档
README
Symfony Workflow integration for Polysource — auto-generated transition buttons + state chip per resource.
Part of the Polysource monorepo. MIT-licensed.
When to use
You're modelling an ecommerce / CRM / claims / HR / regulated workflow with symfony/workflow and want the admin UI to expose only the transitions actually enabled by the workflow guards. This package wraps Symfony's Workflow\Registry into auto-generated Polysource actions and a state chip Twig helper.
See ADR-021. Separate package so polysource/symfony-bundle doesn't pull symfony/workflow for hosts that don't use it.
What it ships
WorkflowAwareInterface+WorkflowAwareTrait— opt-in marker for resources.WorkflowResolver— wraps Symfony WorkflowRegistrywith graceful null-on-failure.TransitionDiscovery— delegates toWorkflow::getEnabledTransitions()(guards natifs Symfony intacts).ApplyTransitionAction— auto-generated per transition, granular permissionPOLYSOURCE_WORKFLOW_TRANSITION_<UPPER>,TransitionException→ActionResult::failure.WorkflowChipPalette+WorkflowChipExtensionTwig (polysource_workflow_chip_palette()+polysource_workflow_state_label())._state_chip.html.twigpartial Bootstrap.- Config
polysource_workflow_bridge.palettes.<workflow>.<state>with wildcard fallback.
Audit log (ADR-020) traces every transition for free (actionName=transition-<name>).
Install
composer require polysource/workflow-bridge symfony/workflow
Register the bundle:
return [ Polysource\WorkflowBridge\PolysourceWorkflowBridgeBundle::class => ['all' => true], ];
Documentation
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-10