8000 [RFC][DX][Workflow] Configuration of initial places and marking store · Issue #30656 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[RFC][DX][Workflow] Configuration of initial places and marking store #30656
Closed
@HeahDude

Description

@HeahDude

Description

  1. In [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore #30551, the marking store has been "simplified" internally, but the configuration is now more confusing (ref [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore #30551 (review)).

  2. In [Workflow] Added support for many inital places #30468, initial_place has been renamed initial_places but still supports passing one place that will be normalized to an array despite this single example in the upgrade file. Also, this naming is now a bit confusing too, whether we can use it with one place is not obvious anymore.

Proposition

  1. Simplify the method type configuration which is the only one built-in we want to support now, and infer the single state from the type of the workflow, this leaves one argument to configure, the property name:

    framework:
     workflows:
         article:
             type: state_machine # or workflow for multiple states
             marking_store:
                 type: method # this line can be removed in Symfony 5.0
                 property: state

    Instead of inferring we can use another key: state (single or multiple) along with property,
    or use a boolean as suggested by @pbowyer in the review linked above.

  2. We could rename initial_places to something invariant like initial_marking or initial_state.

Any other suggestions? What do you think? ping @javiereguiluz @lyrixx

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)RFCRFC = Request For Comments (proposals about features that you want to be discussed)Workflow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0