@@ -24,11 +24,11 @@ This library add Symfony Workflow component integration within Sonata Admin.
2424
2525### Code
2626
27- - a Sonata Admin [ Extension] ( https://sonata-project.org/bundles/admin/master/doc/reference/extensions.html ) :
27+ - a Sonata Admin [ Extension] ( https://sonata-project.org/bundles/admin/master/doc/reference/extensions.html ) :
2828 [ WorkflowExtension] ( src/Admin/Extension/WorkflowExtension.php )
29- - a Controller trait :
29+ - a Controller trait :
3030 [ WorkflowControllerTrait] ( src/Controller/WorkflowControllerTrait.php )
31- - a Controller :
31+ - a Controller :
3232 [ WorkflowController] ( src/Controller/WorkflowController.php )
3333
3434
@@ -44,6 +44,7 @@ Configuration
4444
4545Let say that you have an entity named ` PullRequest ` that is under workflow and for which you have an admin.
4646
47+ #### symfony/workflow <4.3
4748``` yaml
4849# config/packages/workflow.yml
4950framework :
@@ -74,11 +75,42 @@ framework:
7475 to : closed
7576` ` `
7677
78+ #### symfony/workflow ^4.3|^5.0
79+ ` ` ` yaml
80+ # config/packages/workflow.yml
81+ framework :
82+ workflows :
83+ pull_request :
84+ type : state_machine
85+ marking_store :
86+ type : state_machine
87+ property : status
88+ supports :
89+ - App\Entity\PullRequest
90+ places :
91+ - opened
92+ - pending_review
93+ - merged
94+ - closed
95+ initial_marking :
96+ - opened
97+ transitions :
98+ start_review :
99+ from : opened
100+ to : pending_review
101+ merge :
102+ from : pending_review
103+ to : merged
104+ close :
105+ from : pending_review
106+ to : closed
107+ ` ` `
108+
77109### One extension for everything
78110
79111The extension is usable for many entities and with no configuration.
80112
81- You only need to create a service for it, configure the controller that will handle the transition action
113+ You only need to create a service for it, configure the controller that will handle the transition action
82114and configure on which admin you want it available.
83115
84116For instance :
@@ -108,7 +140,7 @@ sonata_admin:
108140 - admin.pull_request
109141` ` `
110142
111- > **note**: You may noticed that we also registered the controller
143+ > **note**: You may noticed that we also registered the controller
112144` Yokai\SonataWorkflow\Controller\WorkflowController` as a service.
113145It is important, because it needs the workflow registry service to work.
114146
@@ -170,12 +202,12 @@ What are these options ?
170202Hook into the transition process
171203--------------------------------
172204
173- Let say that when you start a review for a pull request, as a user,
205+ Let say that when you start a review for a pull request, as a user,
174206you will be asked to enter which users are involved in the review.
175207
176208To achieve this, you will be asked to fill a dedicated form.
177209
178- You only need to create a custom controller for your entity admin :
210+ You only need to create a custom controller for your entity admin :
179211
180212` ` ` yaml
181213# config/packages/sonata_admin.yml
0 commit comments