定制 polysource/workflow-bridge 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 Workflow Registry with graceful null-on-failure.
  • TransitionDiscovery — delegates to Workflow::getEnabledTransitions() (guards natifs Symfony intacts).
  • ApplyTransitionAction — auto-generated per transition, granular permission POLYSOURCE_WORKFLOW_TRANSITION_<UPPER>, TransitionExceptionActionResult::failure.
  • WorkflowChipPalette + WorkflowChipExtension Twig (polysource_workflow_chip_palette() + polysource_workflow_state_label()).
  • _state_chip.html.twig partial 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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固