Skip to content

[Workflow] New lines in the label of a transition break the PUML file #49174

@alexislefebvre

Description

@alexislefebvre

Symfony version(s) affected

5.4+

Description

I tried to add new lines in the label of a transition, in order to have a cleaner output in the PUML file (then transformed to PNG by our toolchain).

So I instinctively wrote this:

                        label: |
                            unpublish
                            (Lorem ipsum dolor sit amet)

It didn't added some new lines, which is an acceptable behaviour.

The problem is that the resulting PUML file had an invalid syntax, and the PUML parser (a think/plantuml Docker image) returns “Syntax error?”.

How to reproduce

# config/packages/workflow.yaml
framework:
    workflows:
        my_workflow:
            transitions:
                unpublish:
                    from: [published]
                    to: pending
                    metadata:
                        arrow_color: 'Grey'
                        label: |
                            unpublish
                            (Lorem ipsum dolor sit amet)

Possible Solution

Remove new lines from the labels.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions