-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[RFC][DX][Workflow] Configuration of initial places and marking store #30656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Re the marking store, this is how the 4.3 behaviour looks when added to the documentation: symfony/symfony-docs@6f51164. I like the idea of inferring the single state from the workflow type |
Currently I see a DX problem that should be handled at configuration level, because having |
@HeahDude Very nice idea. I love it. Would you mind submitting a PR?
|
Ok I can do it, thank you for the feedback. |
…added property (HeahDude, lyrixx) This PR was merged into the 4.3-dev branch. Discussion ---------- [Workflow] Changed initial_places to initial_marking, added property | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #30662 and #30656 | License | MIT | Doc PR | symfony/symfony#30656 EUFOSSA --- * [Workflow] Changed initial_places to initial_marking, added property instead of type * [Workflow] Finished integration of initial_marking + deprecated support for workflow + single state markin store [Workflow] Deprecate worflow and single state marking --- Here is an exemple of deprecation: ``` 3x: Passing something else than "method" has been deprecated in Symfony 4.3. 1x in PhpFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in XmlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in YamlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 3x: The "framework.workflows.workflows.legacy.marking_store.arguments" configuration key has been deprecated in Symfony 4.3. Use "property" instead. 1x in PhpFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in XmlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in YamlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 3x: The "framework.workflows.workflows.legacy.initial_place" configuration key has been deprecated in Symfony 4.3, use the "initial_marking" configuration key instead. 1x in PhpFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in XmlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in YamlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection ``` Commits ------- 039353546f [Workflow] Deprecate worflow and single state marking 87839cfaf9 [Workflow] Finished integration of initial_marking + deprecated support for workflow + single state markin store 73708a61b6 [Workflow] Changed initial_places to initial_marking, added property instead of type
…added property (HeahDude, lyrixx) This PR was merged into the 4.3-dev branch. Discussion ---------- [Workflow] Changed initial_places to initial_marking, added property | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #30662 and #30656 | License | MIT | Doc PR | #30656 EUFOSSA --- * [Workflow] Changed initial_places to initial_marking, added property instead of type * [Workflow] Finished integration of initial_marking + deprecated support for workflow + single state markin store [Workflow] Deprecate worflow and single state marking --- Here is an exemple of deprecation: ``` 3x: Passing something else than "method" has been deprecated in Symfony 4.3. 1x in PhpFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in XmlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in YamlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 3x: The "framework.workflows.workflows.legacy.marking_store.arguments" configuration key has been deprecated in Symfony 4.3. Use "property" instead. 1x in PhpFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in XmlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in YamlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 3x: The "framework.workflows.workflows.legacy.initial_place" configuration key has been deprecated in Symfony 4.3, use the "initial_marking" configuration key instead. 1x in PhpFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in XmlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection 1x in YamlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection ``` Commits ------- 0393535 [Workflow] Deprecate worflow and single state marking 87839cf [Workflow] Finished integration of initial_marking + deprecated support for workflow + single state markin store 73708a6 [Workflow] Changed initial_places to initial_marking, added property instead of type
Description
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)).
In [Workflow] Added support for many inital places #30468,
initial_place
has been renamedinitial_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
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:Instead of inferring we can use another key:
state
(single or multiple) along withproperty
,or use a boolean as suggested by @pbowyer in the review linked above.
We could rename
initial_places
to something invariant likeinitial_marking
orinitial_state
.Any other suggestions? What do you think? ping @javiereguiluz @lyrixx
The text was updated successfully, but these errors were encountered: